-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcore.py
More file actions
28 lines (25 loc) · 936 Bytes
/
Copy pathcore.py
File metadata and controls
28 lines (25 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class UniversalLogic:
def __init__(self):
self.rules = {
"energy_flow": "core_outward",
"matter_inflow": "external_inward",
"cycle": "overload_dispersal_inflow",
"structure": "disk_inner_bulb_outer",
"spin_effect": "affects_distribution",
"transparency": "entities_interact_without_barriers",
"hot_fire_cold_fuel": "energy_gradient_replenishment"
}
def apply_rules(self, obj):
obj.energy += 1 * obj.spin
obj.matter += 0.5 # slow inflow
if obj.layer == "inner":
obj.energy += 1
else:
obj.matter += 1
# apply entity-specific rules if they exist
for rule, value in obj.rules.items():
if rule == "energy_boost":
obj.energy += value
elif rule == "matter_boost":
obj.matter += value
return obj