evt_obj.return_val = 1 return 0 def MindBlankTooltip(attachee, args, evt_obj): # Set the tooltip evt_obj.append("Mind Blank (" + str(args.get_arg(1)) + " rounds)") return 0 def MindBlankEffectTooltip(attachee, args, evt_obj): # Set the tooltip evt_obj.append(tpdp.hash("MIND_BLANK"), -2, " (" + str(args.get_arg(1)) + " rounds)") return 0 def MindBlankRemove(attachee, args, evt_obj): # Show the remove spell effect game.particles('sp-Mind Blank-END', attachee) return 0 mindBlank = PythonModifier("sp-Mind Blank", 4) mindBlank.AddHook(ET_OnSpellImmunityCheck, EK_NONE, MindBlankImmunity, ()) # spell_id, duration, spare, spare mindBlank.AddHook(ET_OnGetTooltip, EK_NONE, MindBlankTooltip, ()) mindBlank.AddHook(ET_OnGetEffectTooltip, EK_NONE, MindBlankEffectTooltip, ()) mindBlank.AddHook(ET_OnConditionRemove, EK_NONE, MindBlankRemove, ()) mindBlank.AddSpellCountdownStandardHook()
return 0 def TouchOfFatigueConditionAdd(attachee, args, evt_obj): tbFlags = tpdp.cur_seq_get_turn_based_status_flags() tbFlags = tbFlags | TBSF_TouchAttack tpdp.cur_seq_set_turn_based_status_flags(tbFlags) attachee.d20_send_signal(S_TouchAttackAdded, 1001) return 0 TouchOfFatigue = PythonModifier("sp-Touch of Fatigue", 4) TouchOfFatigue.AddHook(ET_OnGetTooltip, EK_NONE, TouchOfFatigueTooltip, ()) TouchOfFatigue.AddHook(ET_OnGetEffectTooltip, EK_NONE, TouchOfFatigueEffectTooltip, ()) TouchOfFatigue.AddHook(ET_OnD20Query, EK_Q_Critter_Has_Spell_Active, TouchOfFatigueHasSpellActive, ()) TouchOfFatigue.AddHook(ET_OnD20Query, EK_Q_HoldingCharge, TouchOfFatigueHoldingCharge, ()) TouchOfFatigue.AddHook(ET_OnD20Signal, EK_S_TouchAttackAdded, TouchOfFatigueTouchAttackAdded, ()) TouchOfFatigue.AddHook(ET_OnD20Signal, EK_S_TouchAttack, TouchOfFatigueTouchAttack, ()) TouchOfFatigue.AddHook(ET_OnD20Signal, EK_S_Spell_Cast, TouchOfFatigueSpellCast, ()) TouchOfFatigue.AddHook(ET_OnConditionAdd, EK_NONE, TouchOfFatigueConditionAdd, ()) TouchOfFatigue.AddSpellDispellCheckHook() TouchOfFatigue.AddSpellTouchAttackDischargeRadialMenuHook() TouchOfFatigue.AddSpellCountdownStandardHook()
spell_id = args.get_arg(0) # check that this spell was struck if evt_obj.data1 != spell_id: return 0 game.particles('sp-Mirror Image Loss', attachee) game.sound(32228,1) images = args.get_arg(2) if images <= 1: args.remove_spell() args.remove_spell_mod() else: args.set_arg(2, images-1) return 0 cond = PythonModifier('sp-Greater Mirror Image', 7) cond.AddHook(ET_OnGetTooltip,EK_NONE,MirrorTooltip,()) cond.AddHook(ET_OnGetEffectTooltip,EK_NONE,spellEffectTooltip,()) cond.AddHook(ET_OnBeginRound,EK_NONE,AddImage,()) cond.AddHook(ET_OnD20Query,EK_Q_Critter_Has_Mirror_Image,HasImage,()) cond.AddHook(ET_OnD20Query,EK_Q_Critter_Has_Spell_Active,queryActiveSpell,()) cond.AddHook(ET_OnD20Signal,EK_S_Killed,spellKilled,()) cond.AddHook(ET_OnD20Signal,EK_S_Spell_Mirror_Image_Struck,ImageStruck,()) cond.AddHook(ET_OnD20Signal,EK_S_Dismiss_Spells,checkRemoveSpell,()) cond.AddSpellDispelCheckStandard() cond.AddSpellTeleportPrepareStandard() cond.AddSpellTeleportReconnectStandard() cond.AddSpellCountdownStandardHook()
evt_obj.bonus_list.add(bonus, 0, "Moment of Prescience") # Insight Bonus args.condition_remove() args.remove_spell() return 0 #def MomentOfPrescienceSkillCheck(attachee, args, evt_obj): # enabled_flag = args.get_arg(5) # if enabled_flag: # spell_id = args.get_arg(0) # spell_packet = tpdp.SpellPacket(spell_id) # bonus = min(spell_packet.caster_level, 25) # evt_obj.bonus_list.add(bonus, 0, "Moment of Prescience") # Insight Bonus # args.condition_remove() # return 0 def MomentOfPrescienceRemove(attachee, args, evt_obj): # Show the remove spell effect game.particles( 'sp-Moment of Prescience-END', attachee) return 0 momentOfPrescience = PythonModifier("sp-Moment of Prescience", 6) # momentOfPrescience.AddHook(ET_OnBuildRadialMenuEntry, EK_NONE, MomentOfPrescienceRadial, ()) momentOfPrescience.AddHook(ET_OnGetTooltip, EK_NONE, MomentOfPrescienceTooltip, ()) momentOfPrescience.AddHook(ET_OnGetEffectTooltip, EK_NONE, MomentOfPrescienceEffectTooltip, ()) momentOfPrescience.AddHook(ET_OnGetAC, EK_NONE, MomentOfPrescienceAcBonus, ()) momentOfPrescience.AddHook(ET_OnSaveThrowLevel , EK_NONE , MomentOfPrescienceSaveBonus, ()) momentOfPrescience.AddHook(ET_OnToHitBonus2, EK_NONE, MomentOfPrescienceAttackBonus, ()) #momentOfPrescience.AddHook(ET_OnGetSkillLevel, EK_NONE, MomentOfPrescienceSkillCheck, ()) momentOfPrescience.AddHook(ET_OnConditionRemove, EK_NONE, MomentOfPrescienceRemove, ()) momentOfPrescience.AddSpellCountdownStandardHook()
print "Removed Surprised condition" evt_obj.return_val = 0 return 0 def ForesightAcBonus(attachee, args, evt_obj): evt_obj.bonus_list.add(2, 0, "Foresight") # Insight Bonus return 0 def ForesightReflexSaveBonus(attachee, args, evt_obj): evt_obj.bonus_list.add(2, 0, "Foresight") # Insight Bonus return 0 def ForesightRemove(attachee, args, evt_obj): # Show the remove spell effect game.particles('sp-Foresight-END', attachee) return 0 foresight = PythonModifier("sp-Foresight", 4) foresight.AddHook(ET_OnGetTooltip, EK_NONE, ForesightTooltip, ()) foresight.AddHook(ET_OnGetEffectTooltip, EK_NONE, ForesightEffectTooltip, ()) foresight.AddHook(ET_OnConditionAddPre, EK_NONE, ConditionImmunityOnPreAdd, ()) foresight.AddHook(ET_OnGetAC, EK_NONE, ForesightAcBonus, ()) foresight.AddHook(ET_OnSaveThrowLevel, EK_SAVE_REFLEX, ForesightReflexSaveBonus, ()) foresight.AddHook(ET_OnConditionRemove, EK_NONE, ForesightRemove, ()) foresight.AddSpellCountdownStandardHook()
spellId = args.get_arg(0) spell_packet = tpdp.SpellPacket(spellId) if spell_packet.spell_enum == 0: return if spell_packet.caster != OBJ_HANDLE_NULL: spell_packet.float_spell_line(spell_packet.caster, 20000, tf_white) args.remove_spell() args.remove_spell_mod() return 0 wallOfFire = PythonModifier("sp-Wall of Fire", 8) wallOfFire.AddHook(ET_OnConditionAdd, EK_NONE, WallOfFireOnAdd, ()) wallOfFire.AddHook(ET_OnObjectEvent, EK_OnEnterAoE, OnWallAoEEntered, ()) wallOfFire.AddHook(ET_OnD20Signal, EK_S_Concentration_Broken, OnConcentrationBroken, ()) wallOfFire.AddHook(ET_OnD20Signal, EK_S_Combat_End, OnCombatEnd, ()) wallOfFire.AddSpellCountdownStandardHook() wallOfFire.AddAoESpellEndStandardHook() #wallOfFire.AddSpellDismissStandardHook() # oops, Wall of Fire doesn't have Dismiss (but it does have COncentration...) ################################################## # sp-Wall of fire hit # does damage at the beginning of round ################################################## def EndSpellMod(attachee, args, evt_obj): spell_id = args.get_arg(0) if evt_obj.data1 == spell_id: print "Ending mod for spell ID: " + str(spell_id) args.remove_spell_mod() # does a .condition_remove() with some safety checks
magicCircleOutward.AddHook(ET_OnD20Query, EK_Q_Critter_Has_Spell_Active, MagicCircleOutwardHasSpellActive, ()) magicCircleOutward.AddHook(ET_OnD20Signal, EK_S_Killed, MagicCircleOutwardKilled, ()) magicCircleOutward.AddHook(ET_OnD20Signal, EK_S_Spell_End, MagicCircleOutwardSpellEnd, ()) magicCircleOutward.AddHook(ET_OnD20PythonQuery, "Has Magic Circle Spell", HasMagicCircleQuery, ()) magicCircleOutward.AddHook(ET_OnGetTooltip, EK_NONE, MagicCircleOutwardTooltip, ()) magicCircleOutward.AddHook(ET_OnGetEffectTooltip, EK_NONE, MagicCircleOutwardEffectTooltip, ()) magicCircleOutward.AddSpellDispelCheckStandard() magicCircleOutward.AddSpellTeleportPrepareStandard() magicCircleOutward.AddSpellTeleportReconnectStandard() magicCircleOutward.AddSpellCountdownStandardHook() def MagicCircleOutwardEffAoEExited(attachee, args, evt_obj): obj_evt_id = args.get_arg(0) if obj_evt_id != evt_obj.evt_id: print "Magic Circle Outward Aura: ID mismatch " + str( evt_obj.evt_id) + ", stored was: " + str(obj_evt_id) return 0 print "Magic Circle Outward Aura (ID " + str( obj_evt_id) + ") Exited, critter: " + attachee.description + " " args.condition_remove() return 0 def MagicCircleOutwardEffTooltip(attachee, args, evt_obj):
def Remove(attachee, args, evt_obj): args.condition_remove() return 0 vertigo = PythonModifier('sp-Vertigo', 4) vertigo.AddHook(ET_OnGetTooltip, EK_NONE, spellTooltip, ()) vertigo.AddHook(ET_OnGetEffectTooltip, EK_NONE, spellEffectTooltip, ()) vertigo.AddHook(ET_OnToHitBonus2, EK_NONE, Penalty, ()) vertigo.AddHook(ET_OnSaveThrowLevel, EK_NONE, Penalty, ()) vertigo.AddHook(ET_OnD20Signal, EK_S_BeginTurn, Balance, ()) vertigo.AddHook(ET_OnD20Signal, EK_S_Killed, Remove, ()) vertigo.AddHook(ET_OnD20Signal, EK_S_Dismiss_Spells, checkRemoveSpell, ()) vertigo.AddSpellDispelCheckStandard() vertigo.AddSpellTeleportPrepareStandard() vertigo.AddSpellTeleportReconnectStandard() vertigo.AddSpellCountdownStandardHook() def Unsteady(attachee, args, evt_obj): # flags, newCap, capType, mesline evt_obj.bonus_list.set_overall_cap(1, 0, 0, 1004) evt_obj.bonus_list.set_overall_cap(2, 0, 0, 1004) return 0 def UTooltip(attachee, args, evt_obj): evt_obj.append('Unsteady') return 0 def UETooltip(attachee, args, evt_obj): key = tpdp.hash('UNSTEADY') evt_obj.append(key, -2, '') return 0