Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import stats
import context
import invocations
# Priests get AIR, SOLAR, and WATER magic. These spells use a mixture of two
# or more of those colors.
# CIRCLE ONE
ARMOR_OF_FAITH = Spell( "Armor of Faith",
"The caster is infused with divine energy, healing wounds and bestowing protection.",
effects.HealthRestore( dice=(3,6,0), anim=animobs.YellowSparkle, children = (
effects.Enchant( enchantments.BlessingEn, anim=None ),
effects.Enchant( enchantments.AirArmor, anim=None )
,) ), rank=1, gems={SOLAR:1,AIR:1}, com_tar=targetarea.SelfOnly(),
ai_tar=invocations.TargetWoundedAlly(), mpfudge=-2 )
BLAST_UNDEAD = Spell( "Blast Undead",
"This mystic bolt deals 1-6 damage to undead creatures.",
effects.TargetIs( pat=effects.UNDEAD, on_true = (
effects.HealthDamage((1,6,0), stat_bonus=stats.PIETY, element=stats.RESIST_SOLAR, anim=animobs.YellowExplosion )
,), on_false = (
effects.NoEffect( anim=animobs.SmallBoom )
,) ),
rank=1, gems={SOLAR:1,WATER:1}, com_tar=targetarea.SingleTarget(), shot_anim=animobs.YellowBolt, mpfudge=-1 )
# CIRCLE TWO
WEAPON_BLESSING = Spell( "Weapon Blessing",
"One ally's weapon will be blessed to do an extra 1-8 points of damage.",
effects.Enchant( enchantments.BlessedWepEn, anim=animobs.YellowSparkle ),
exp_tar=targetarea.SinglePartyMember(), mpfudge = -4 )
RESTORATION = Spell( "Restoration",
"This spell heals all stat damage that has been done to a single ally.",
effects.StatRestore( anim=animobs.HealthUp ),
rank=4, gems={SOLAR:2}, com_tar=targetarea.SingleTarget(reach=1),
exp_tar=targetarea.SinglePartyMember() )
# CIRCLE 5
MASS_CURE = Spell( "Mass Cure",
"This spell will heal all allies within 3 tiles for 4-40 damage.",
effects.TargetIsAlly( on_true = (
effects.HealthRestore( dice=(4,10,0) )
,) ), rank=5, gems={SOLAR:3}, com_tar=targetarea.SelfCentered(radius=3), ai_tar=invocations.TargetWoundedAlly(),
exp_tar=targetarea.AllPartyMembers() )
REMOVE_CURSE = Spell( "Remove Curse",
"This spell will dispel all harmful magical effects from a single party member.",
effects.TidyEnchantments( enchantments.CURSE, anim=animobs.YellowSparkle ),
rank=5, gems={SOLAR:2}, com_tar=targetarea.SingleTarget(reach=1),
exp_tar=targetarea.SinglePartyMember(), mpfudge = -5 )
# CIRCLE 6
MAXIMUM_CURE = Spell( "Maximum Cure",
"This spell will heal one nearby ally for 20-120 damage.",
effects.HealthRestore( dice=(20,6,0) ),
rank=6, gems={SOLAR:3}, com_tar=targetarea.SingleTarget(reach=1), ai_tar=invocations.TargetWoundedAlly(),
exp_tar=targetarea.SinglePartyMember() )
WINTER_WIND = Spell( "Winter Wind",
"Conjures a cone of intense cold which freezes enemies for 2d6 damage.",
effects.OpposedRoll( on_success = (
effects.HealthDamage( (2,6,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_COLD, anim=animobs.BlueCloud )
,), on_failure = (
effects.HealthDamage( (1,6,0), stat_bonus=None, element=stats.RESIST_COLD, anim=animobs.BlueCloud )
,) ), rank=3, gems={WATER:2}, com_tar=targetarea.Cone(reach=8),
ai_tar=invocations.TargetEnemy() )
REGENERATION = Spell( "Regeneration",
"Infuses a single ally will life energy, allowing them to regenerate 1d6 health per turn.",
effects.Enchant( enchantments.RegeneratEn, anim=animobs.GreenSparkle, children=(
effects.HealthRestore( dice=(1,6,0) )
,) ),
rank=3, gems={WATER:2}, com_tar=targetarea.SingleTarget(), exp_tar=targetarea.SinglePartyMember(),
ai_tar=invocations.TargetWoundedAlly() )
# CIRCLE FOUR
RESIST_ELEMENTS = Spell( "Resist Elements",
"All allies within 6 tiles get 50% resistance to wind, water, and poison damage for the duration of combat.",
effects.TargetIsAlly( on_true = (
effects.Enchant( enchantments.ResistElementsEn, anim=animobs.GreenSparkle ),
)),
rank=4, gems={WATER:2}, com_tar=targetarea.SelfCentered(),
ai_tar=invocations.TargetAllyWithoutEnchantment(enchantments.ResistElementsEn) )
# CIRCLE FIVE
HEALING_MISTS = Spell( "Healing Mists",
"The party is bathed in beneficial vapors, allowing all allies to regenerate their wounds.",
effects.TargetIsAlly( on_true = (
effects.StatRestore( anim=None ),
)),
rank=7, gems={SOLAR:4}, com_tar=targetarea.SingleTarget(reach=1), ai_tar=invocations.TargetWoundedAlly(),
exp_tar=targetarea.SinglePartyMember() )
# CIRCLE 8
# Resurrection
# CIRCLE 9
MIRACLE_CURE = Spell( "Miracle Cure",
"This spell will heal all allies within 10 tiles for 20-120 damage.",
effects.TargetIsAlly( on_true = (
effects.HealthRestore( dice=(20,6,0) )
,) ), rank=9, gems={SOLAR:4}, com_tar=targetarea.SelfCentered(radius=10), ai_tar=invocations.TargetWoundedAlly(),
exp_tar=targetarea.AllPartyMembers(), mpfudge = 25 )
ai_tar=invocations.TargetEnemy() )
HEROISM = Spell( "Heroism",
"All allies within 6 tiles get a +2 bonus to strength, toughness, reflexes, intelligence, piety, and charisma until the end of combat.",
effects.TargetIsAlly( on_true = (
effects.Enchant( enchantments.HeroismEn, anim=animobs.YellowSparkle )
,) ), rank=2, gems={AIR:1,WATER:1}, com_tar=targetarea.SelfCentered(),
ai_tar=invocations.TargetAllyWithoutEnchantment(enchantments.HeroismEn) )
# CIRCLE THREE
HEALING_LIGHT = Spell( "Healing Light",
"Blessed radiance will heal one ally for 3-24 damage.",
effects.HealthRestore( dice=(3,8,0) ),
rank=3, gems={AIR:1,SOLAR:2}, com_tar=targetarea.SingleTarget(reach=10), ai_tar=invocations.TargetWoundedAlly(),
exp_tar=targetarea.SinglePartyMember(), shot_anim=animobs.YellowVortex )
PROTECT_FROM_EVIL = Spell( "Protection from Evil",
"All allies within 6 tiles get +10% defense, +10% aura, and 50% resistance to dark damage for the duration of combat.",
effects.TargetIsAlly( on_true = (
effects.Enchant( enchantments.ProtectFromEvilEn, anim=animobs.YellowSparkle ),
)),
rank=3, gems={SOLAR:1,WATER:1}, com_tar=targetarea.SelfCentered(),
ai_tar=invocations.TargetAllyWithoutEnchantment(enchantments.ProtectFromEvilEn) )
# CIRCLE FOUR
BLIZZARD = Spell( "Blizzard",
"Conjures a storm which causes 2d5 cold damage and 2d5 wind damage.",
effects.OpposedRoll( on_success = (