Commits

featheredmelody committed 54bf337

[Bugfix] Crash when using self destruct trait.

  • Participants
  • Parent commits 684becf

Comments (0)

Files changed (3)

Story of a Lost Sky/lostsky/battle/trait_skills.py

 
         # Shield uses standard defense calculation for spell actions against physical defense
         target_total_mods = target.compute_total_stat_mods()
-        shield = (target.DEF*(1.0+target_total_mods[1]) + target.spell_actions[target.equipped].defmod)*target.map.terrainmap[tuple(target.location_tile)][0].TDEF*target.spell_actions[target.equipped].shield
+        shield = (target.DEF*(1.0+target_total_mods[1]) + target.spell_actions[target.equipped].defmod)*target.spell_actions[target.equipped].shield
+
+
 
         # Final damage = Effect - Shield
-        damage = int(effect - shield)
+        damage = effect - shield
+        damage *= (1+unit.map.terrainmap[tuple(target.location_tile)][0].damage_mod / 100.0)
 
-        return damage
+        return int(damage)
 
     def player_interface(self, unit):
 

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

 #                          'location':(9, 18)},
 #                         ]
 
-        required_starters = ['Youmu', 'Keine']
+        required_starters = ['Youmu', 'Alice']
         pre_mission_MAE = PreMissionMAE()
         mid_mission_MAE_list = []
         required_survivors = ['Youmu']
         # lantern.switch_state(True)
 
 
-        self.set_spirit_charge('Youmu', 900)
+        self.set_spirit_charge('Alice', 900)
 
         self.map.all_units_by_name['Youmu'].exp = 90
 

Story of a Lost Sky/tools/mission_launcher.py

 ###########################
 
 # Make sure your mission is loaded in the mission_catalog.py file.
-mission_name =  'CH1ST1'
+mission_name =  'CH0ST1'
 print "Launching Mission: %s"%mission_name
 
 # Add all characters. If the character is added during
               'Chen':{'level':20,
                         'spells':['Leaf Crystal','Pentagram Flight'],
                          'traits':[]},
-              #
-              # 'Marisa':{'level':20,
-              #            'spells':['Fireball','Master Spark','Rice Cake'],
-              #            'traits':[]},
-              #
-              # 'Reimu':{'level':20,
-              #            'spells':['Holy Amulet','Fantasy Seal','Barrier Buster','Weakening Amulet'],
-              #            'traits':[] },
-              # 'Keine':{'level':20,
-              #            'spells':['Healing Drop','Medicinal Drop','Sunbeam Mirror','Encourage','Tracking Shot'],
-              #            'traits':[] },
-              #
-              # 'Mokou':{'level':20,
-              #           'spells':['Dagger Throw','Flying Phoenix','Rice Cake'],
-              #            'traits':[] },
-              # # 'Aya':{'level':20,
-              #           'spells':['Holy Amulet','Tengu Wind Path', 'Rice Cake'],
-              #           'traits':[] },
-              #
-              # 'Alice':{'level':20,
-              #           'spells':['Fireball','Artful Sacrifice','Rice Cake'],
-              #            'traits':[] },
+
+              'Marisa':{'level':20,
+                         'spells':['Fireball','Master Spark','Rice Cake'],
+                         'traits':[]},
+
+              'Reimu':{'level':20,
+                         'spells':['Holy Amulet','Fantasy Seal','Barrier Buster','Weakening Amulet'],
+                         'traits':[] },
+              'Keine':{'level':20,
+                         'spells':['Healing Drop','Medicinal Drop','Sunbeam Mirror','Encourage','Tracking Shot'],
+                         'traits':[] },
+
+              'Mokou':{'level':20,
+                        'spells':['Dagger Throw','Flying Phoenix','Rice Cake'],
+                         'traits':[] },
+              'Aya':{'level':20,
+                        'spells':['Holy Amulet','Tengu Wind Path', 'Rice Cake'],
+                        'traits':[] },
+
+              'Alice':{'level':20,
+                        'spells':['Fireball','Artful Sacrifice','Rice Cake'],
+                         'traits':[] },
 
               }