Commits

featheredmelody committed 53e3b1b

[Bugfix] Misaki leveling up would prevent the barrier from breaking.
- Switched CH3ST4 to using Cust. Variables instead of HP to determine what phase we are on.

Comments (0)

Files changed (1)

Story of a Lost Sky/lostsky/missions/ch3st5.py

 from lostsky.worldmap.event import BattleEvent
 from lostsky.battle.mapdata import MapData
-from lostsky.battle.mapaction import MapActionEvent, UnitHPBelowTrigger, UnitAliveTrigger, SSPStateTrigger
+from lostsky.battle.mapaction import MapActionEvent, UnitHPBelowTrigger, UnitAliveTrigger, SSPStateTrigger, CustVarTrigger
 from lostsky.battle.mapobj import SpiritSourcePoint
 
 class Mission(BattleEvent):
         self.center_on('Misaki')
         self.play_sfx('miss')
         self.show_animation('barrier_spell', tuple(self.map.all_units_by_name['Misaki'].location_tile))
+        self.set_cust_var('Phase 2', True)
+
 
 class Misaki3(MapActionEvent):
     def __init__(self):
                     SSPStateTrigger('NorthEast', 1),
                     SSPStateTrigger('SouthEast', 1),
                     SSPStateTrigger('SouthWest', 1),
-                    UnitHPBelowTrigger('Misaki', 300)
+                    CustVarTrigger('Phase 2', True)
                     ]
 
         MapActionEvent.__init__(self,triggers)
         self.center_on('Misaki')
         self.play_sfx('miss')
         self.show_animation('barrier_spell', tuple(self.map.all_units_by_name['Misaki'].location_tile))
+        self.set_cust_var('Phase 3', True)
 
 class Misaki5(MapActionEvent):
     def __init__(self):
                     SSPStateTrigger('NorthEast', 1),
                     SSPStateTrigger('SouthEast', 1),
                     SSPStateTrigger('SouthWest', 1),
-                    UnitHPBelowTrigger('Misaki', 150)
+                    CustVarTrigger('Phase 3', True)
                     ]
 
         MapActionEvent.__init__(self,triggers)