diff --git a/TemplePlus/ui/ui_item_creation.cpp b/TemplePlus/ui/ui_item_creation.cpp index 173f1176f..4103be951 100644 --- a/TemplePlus/ui/ui_item_creation.cpp +++ b/TemplePlus/ui/ui_item_creation.cpp @@ -962,9 +962,12 @@ void UiItemCreation::CraftScrollWandPotionSetItemSpellData(objHndl objHndItem, o auto baseDescr = description.GetDescriptionString(obj->GetInt32(obj_f_description) ); auto spellName = spellSys.GetSpellName(mScribedScrollSpell); int SPELL_ENUM_AID = 1; - auto aidSpellName = spellSys.GetSpellName(SPELL_ENUM_AID); - auto pos = std::strstr(baseDescr, aidSpellName); - auto endPos = pos + std::strlen(aidSpellName); + auto aidSpellName = std::string(spellSys.GetSpellName(SPELL_ENUM_AID)); + auto pos = std::strstr(baseDescr, aidSpellName.c_str()); + if (!pos) { + pos = std::strstr(baseDescr, tolower(aidSpellName).c_str()); + } + auto endPos = pos + aidSpellName.size(); char newName[1024] = {0,}; auto idx = 0; for (idx = 0; baseDescr + idx < pos; ++idx) { diff --git a/tpdatasrc/co8fixes/scr/py00011farmer wife.py b/tpdatasrc/co8fixes/scr/py00011farmer wife.py index c8b20917a..e83f4fc7c 100644 --- a/tpdatasrc/co8fixes/scr/py00011farmer wife.py +++ b/tpdatasrc/co8fixes/scr/py00011farmer wife.py @@ -71,5 +71,5 @@ def run_off( attachee, triggerer ): # attachee.ai_shitlist_remove( pc ) # attachee.reaction_set( pc, 50 ) attachee.runoff(attachee.location-3) - Timed_Destroy(obj, 5000) + Timed_Destroy(attachee, 5000) return RUN_DEFAULT diff --git a/tpdatasrc/co8fixes/scr/py00040hedrack_allies.py b/tpdatasrc/co8fixes/scr/py00040hedrack_allies.py index 49d162c5b..98dbeaecf 100644 --- a/tpdatasrc/co8fixes/scr/py00040hedrack_allies.py +++ b/tpdatasrc/co8fixes/scr/py00040hedrack_allies.py @@ -77,7 +77,7 @@ def san_heartbeat( attachee, triggerer ): game.global_vars[747] = 0 elif (attachee.name == 8076): # hedrack ally mage 2 - if (attachee.distance_to(game.party[0]) <= 100 or attachee.distance_to(game.party[1]) <= 100 or attachee.distance_to(game.party[2]) <= 100 or attachee.distance_to(game.party[3]) <= 100 or attachee.distance_to(game.party[4]) <= 100 or attachee.distance_to(game.party[5]) <= 100 or attachee.distance_to(game.party[6]) <= 100 or attachee.distance_to(game.party[7]) <= 100): + if any([attachee.distance_to(pc) <= 100 for pc in game.party]): game.global_vars[748] = game.global_vars[748] + 1 if (attachee.leader_get() == OBJ_HANDLE_NULL): if (game.global_vars[748] == 4): diff --git a/tpdatasrc/co8fixes/scr/py00323Nulb_village_woman.py b/tpdatasrc/co8fixes/scr/py00323Nulb_village_woman.py index 842ca7dcf..34f066309 100644 --- a/tpdatasrc/co8fixes/scr/py00323Nulb_village_woman.py +++ b/tpdatasrc/co8fixes/scr/py00323Nulb_village_woman.py @@ -76,28 +76,7 @@ def stop_watch( attachee, triggerer ): def all_dead(): if (game.global_vars[958] == 6): game.global_vars[958] = 7 - pc1 = game.party[0] - pc1.critter_kill_by_effect() - game.particles( "sp-Poison", pc1 ) - pc2 = game.party[1] - pc2.critter_kill_by_effect() - game.particles( "sp-Poison", pc2 ) - pc3 = game.party[2] - pc3.critter_kill_by_effect() - game.particles( "sp-Poison", pc3 ) - pc4 = game.party[3] - pc4.critter_kill_by_effect() - game.particles( "sp-Poison", pc4 ) - pc5 = game.party[4] - pc5.critter_kill_by_effect() - game.particles( "sp-Poison", pc5 ) - pc6 = game.party[5] - pc6.critter_kill_by_effect() - game.particles( "sp-Poison", pc6 ) - pc7 = game.party[6] - pc7.critter_kill_by_effect() - game.particles( "sp-Poison", pc7 ) - pc8 = game.party[7] - pc8.critter_kill_by_effect() - game.particles( "sp-Poison", pc8 ) + for pc in game.party: + pc.critter_kill_by_effect() + game.particles( "sp-Poison", pc ) return 1 \ No newline at end of file