How to use the invocations.TargetEnemy function in invocations

To help you get started, we’ve selected a few invocations examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jwvhewitt / dmeternal / spells / airspells.py View on Github external
PROBE = Spell( "Probe",
    "This spell reveals secret knowledge about one target creature.",
    effects.NoEffect( anim=animobs.BlueSparkle, children = (
        effects.Probe()
    ,) ), rank=1, gems={AIR:1}, mpfudge=-1, com_tar=targetarea.SingleTarget(), exp_tar=targetarea.SingleTarget() )

# CIRCLE TWO

SILENCE = Spell( "Silence",
    "Targets within a 2 tile radius may be silenced, preventing them from casting spells.",
    effects.OpposedRoll( att_modifier=0, on_success = (
        effects.CauseSilence(),
    ), on_failure = (
        effects.NoEffect( anim=animobs.SmallBoom ),
    )),
    rank=2, gems={AIR:1}, com_tar=targetarea.Blast(radius=2), ai_tar=invocations.TargetEnemy() )

SHOUT = Spell( "Shout",
    "The caster's words become a sonic wave, doing 1d8 wind damage to all targets within reach.",
    effects.OpposedRoll( on_success = (
        effects.HealthDamage( (1,8,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_WIND, anim=animobs.SonicHit )
    ,), on_failure = (
        effects.HealthDamage( (1,4,0), stat_bonus=None, element=stats.RESIST_WIND, anim=animobs.SonicHit )
    ,) ), rank=2, gems={AIR:2}, com_tar=targetarea.Cone(reach=4), ai_tar=invocations.TargetEnemy(), mpfudge=-1 )

# CIRCLE THREE

THUNDER_STRIKE = Spell( "Thunder Strike",
    "A bolt of lightning strikes all in its path for 3d6 damage.",
    effects.OpposedRoll( on_success = (
        effects.HealthDamage( (3,6,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_LIGHTNING, anim=animobs.Spark )
    ,), on_failure = (
github jwvhewitt / dmeternal / spells / airspells.py View on Github external
# CIRCLE SEVEN

    # Identify All


# CIRCLE EIGHT

THUNDER_STORM = Spell( "Thunder Storm",
    "Calls down the wrath of the heavens. All targets within a 5 tile radius will be struck for 10d8 lightning damage.",
    effects.OpposedRoll( on_success = (
        effects.HealthDamage( (10,8,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_LIGHTNING, anim=animobs.ThunderStorm )
    ,), on_failure = (
        effects.HealthDamage( (4,10,0), stat_bonus=None, element=stats.RESIST_LIGHTNING, anim=animobs.ThunderStorm )
    ,) ), rank=8, gems={AIR:5}, com_tar=targetarea.Blast(radius=5), 
    ai_tar=invocations.TargetEnemy(min_distance=6) )
github jwvhewitt / dmeternal / spells / earthspells.py View on Github external
effects.CallMonster( {context.MTY_CREATURE: True, context.DES_EARTH: context.MAYBE, context.GEN_NATURE: context.MAYBE}, 2, anim=animobs.OrangeSparkle ),
    rank=1, gems={EARTH:1}, com_tar=targetarea.SingleTarget(reach=2), ai_tar=invocations.TargetEmptySpot(), mpfudge = 3 )

# CIRCLE 2

ACID_BOLT = Spell( "Acid Bolt",
    "This attack does 2d5 acid damage to a single target, and may corrode the target's armor.",
    effects.OpposedRoll( on_success = (
        effects.HealthDamage( (2,5,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_ACID, anim=animobs.GreenExplosion ),
        effects.OpposedRoll( def_stat=stats.TOUGHNESS, on_success = (
            effects.Enchant( enchantments.ArmorDamage, anim=animobs.OrangeSparkle )
        ,))
    ), on_failure = (
        effects.HealthDamage( (1,5,0), stat_bonus=None, element=stats.RESIST_ACID, anim=animobs.GreenExplosion )
    ,) ), rank=2, gems={EARTH:1}, com_tar=targetarea.SingleTarget(), shot_anim=animobs.GreenSpray,
    ai_tar=invocations.TargetEnemy() )

BEASTLY_MIGHT = Spell( "Beastly Might",
    "Imbues a single ally with supernatural strength, giving +4 strength, +4 toughness, and +5% to attack.",
    effects.Enchant( enchantments.BeastlyMightEn, anim=animobs.OrangeSparkle ),
    rank=2, gems={EARTH:1}, com_tar=targetarea.SingleTarget(),
    ai_tar=invocations.TargetAllyWithoutEnchantment(enchantments.BeastlyMightEn) )


# CIRCLE 3

SHAPE_FLESH = Spell( "Shape Flesh",
    "By touching a living creature, you may reshape its flesh so as to either cause or cure 3-18 damage.",
    effects.TargetIs( effects.ALIVE, on_true= (
        effects.TargetIsAlly( on_true=(
            effects.HealthRestore( dice=(3,6,0) ), ),),
        effects.TargetIsEnemy( on_true=(
github jwvhewitt / dmeternal / spells / priestspells.py View on Github external
on_failure= (effects.HealthDamage( (1,5,0), stat_bonus=None, element=stats.RESIST_WIND, anim=animobs.Blizzard),),
            on_death= (effects.HealthDamage( (1,5,0), stat_bonus=None, element=stats.RESIST_WIND, anim=animobs.Blizzard),),
     )
    ,) ), rank=4, gems={WATER:1,AIR:1}, com_tar=targetarea.Blast(radius=4, delay_from=1),
    ai_tar=invocations.TargetEnemy(min_distance=5) )

DIVINE_HAMMER = Spell( "Divine Hammer",
    "This attack does 4d8 holy damage to a single target. Unholy creatures may be stunned.",
    effects.OpposedRoll( def_stat=stats.REFLEXES, on_success = (
        effects.HealthDamage( (4,8,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_SOLAR, anim=animobs.RedBoom ),
        effects.TargetIs( pat=effects.UNHOLY, on_true = (
            effects.Paralyze( max_duration = 3 ),
        ))
    ,), on_failure = (
        effects.HealthDamage( (2,8,2), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_SOLAR, anim=animobs.RedBoom )
    ,) ), rank=4, gems={AIR:1,SOLAR:1}, com_tar=targetarea.SingleTarget(), shot_anim=animobs.YellowVortex, ai_tar=invocations.TargetEnemy() )

SANCTUARY = Spell( "Sanctuary",
    "Enemies within 4 tiles will be frozen in place for a short time.",
    effects.TargetIsEnemy( on_true = (
        effects.OpposedRoll( on_success = (
            effects.Paralyze( max_duration = 3 ),
        ))
    ,) ), rank=4, gems={SOLAR:1,WATER:2}, com_tar=targetarea.SelfCentered(radius=4,exclude_middle=True),
    ai_tar=invocations.TargetEnemy() )


# CIRCLE FIVE

SMITE = Spell( "Smite",
    "A bolt of lightning will unerringly strike all targets in a 2 tile radius for 3d10 damage.",
    effects.HealthDamage( (3,10,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_LIGHTNING, anim=animobs.BlueZap ),
github jwvhewitt / dmeternal / spells / waterspells.py View on Github external
CALL_WATER_ELEMENTAL = Spell( "Call Water Elemental",
    "This spell will call forth a living embodiment of the seas to do your bidding.",
    effects.CallMonster( {context.DES_WATER: True, context.SUMMON_ELEMENTAL: True }, 12, anim=animobs.GreenSparkle ),
    rank=6, gems={WATER:3}, com_tar=targetarea.SingleTarget(reach=5), ai_tar=invocations.TargetEmptySpot(), mpfudge = 12 )


# CIRCLE SEVEN

HAIL_STORM = Spell( "Hail Storm",
    "Conjures a storm of freezing hail. All targets caught within a 5 tile radius take 10d6 cold damage.",
    effects.OpposedRoll( on_success = (
        effects.HealthDamage( (10,6,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_COLD, anim=animobs.IceStorm )
    ,), on_failure = (
        effects.HealthDamage( (3,10,0), stat_bonus=None, element=stats.RESIST_COLD, anim=animobs.IceStorm )
    ,) ), rank=7, gems={WATER:4}, com_tar=targetarea.Blast(radius=5), shot_anim=animobs.BlueComet, 
    ai_tar=invocations.TargetEnemy(min_distance=6) )


# CIRCLE EIGHT

RESIST_ATOMIC = Spell( "Resist Atomic",
    "All allies within 6 tiles get 50% resistance to atomic damage for the duration of combat.",
    effects.TargetIsAlly( on_true = (
        effects.Enchant( enchantments.ResistAtomicEn, anim=animobs.GreenSparkle ),
    )),
    rank=8, gems={WATER:3}, com_tar=targetarea.SelfCentered(),
    ai_tar=invocations.TargetAllyWithoutEnchantment(enchantments.ResistAtomicEn) )
github jwvhewitt / dmeternal / spells / druidspells.py View on Github external
# CIRCLE EIGHT

CALL_JUGGERNAUT = Spell( "Call Juggernaut",
    "This spell will summon a nigh-unstoppable monster to fight on your behaf.",
    effects.CallMonster( {context.MTY_CREATURE: True, context.DES_EARTH: context.MAYBE, context.GEN_NATURE: context.MAYBE, context.DES_SOLAR: context.MAYBE}, 16, anim=animobs.OrangeSparkle ),
    rank=8, gems={EARTH:3,SOLAR:2}, com_tar=targetarea.SingleTarget(reach=3), ai_tar=invocations.TargetEmptySpot(), mpfudge = 16 )


NATURAL_DISASTER = Spell( "Natural Disaster",
    "Causes massive fire damage in a five tile radius.",
    effects.OpposedRoll( on_success = (
        effects.HealthDamage( (10,10,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_FIRE, anim=animobs.Nuclear )
    ,), on_failure = (
        effects.HealthDamage( (5,10,0), stat_bonus=None, element=stats.RESIST_FIRE, anim=animobs.Nuclear )
    ,) ), rank=8, gems={EARTH:2,FIRE:3}, com_tar=targetarea.Blast(radius=5, delay_from=1), shot_anim=animobs.BigMeteor,
    ai_tar=invocations.TargetEnemy(min_distance=6) )

# CIRCLE NINE

CALL_LEVIATHAN = Spell( "Call Leviathan",
    "This spell will summon a legendary monster to fight on your behaf.",
    effects.CallMonster( {context.MTY_CREATURE: True, context.DES_EARTH: context.MAYBE, context.GEN_NATURE: context.MAYBE, context.DES_SOLAR: context.MAYBE}, 18, anim=animobs.OrangeSparkle ),
    rank=9, gems={EARTH:3,SOLAR:3}, com_tar=targetarea.SingleTarget(reach=4), ai_tar=invocations.TargetEmptySpot(), mpfudge = 20 )
github jwvhewitt / dmeternal / spells / solarspells.py View on Github external
# Death Ward

# CIRCLE 7

SUNBURST = Spell( "Sunburst",
    "Conjures an intense ball of light which does 5d10 solar damage to all enemies in a 3 tile radius.",
    effects.TargetIsEnemy( on_true=(
        effects.OpposedRoll( on_success = (
            effects.HealthDamage( (5,10,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_SOLAR, anim=animobs.YellowExplosion )
        ,), on_failure = (
            effects.HealthDamage( (2,12,0), stat_bonus=None, element=stats.RESIST_SOLAR, anim=animobs.YellowExplosion ), )
        ),
        ), on_false = (effects.NoEffect( anim=animobs.YellowExplosion ),)
    ), rank=7, gems={SOLAR:2}, com_tar=targetarea.Blast(radius=3,delay_from=1), shot_anim=animobs.GoldStone, 
    ai_tar=invocations.TargetEnemy(min_distance=4) )

RENEWAL = Spell( "Renewal",
    "This spell will heal one nearby ally for 50-120 damage, retore drained stats, remove curses and cure poisoning.",
    effects.TargetIsAlly( on_true = (
        effects.HealthRestore( dice=(10,8,40) ),
        effects.TidyEnchantments( enchantments.CURSE, anim=None ),
        effects.TidyEnchantments( enchantments.POISON, anim=None ),
        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
github jwvhewitt / dmeternal / spells / necrospells.py View on Github external
effects.OpposedRoll( on_success = (
        effects.HealthDamage( (10,4,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_ACID, anim=animobs.AcidStorm )
    ,), on_failure = (
        effects.HealthDamage( (2,10,0), stat_bonus=None, element=stats.RESIST_ACID, anim=animobs.AcidStorm )
    ,) ), rank=6, gems={EARTH:1,WATER:3}, com_tar=targetarea.Blast(radius=5), 
    ai_tar=invocations.TargetEnemy(min_distance=6) )

FREEZE_RAY = Spell( "Freeze Ray",
    "Freezes all targets in a 2 tile radius for 6d8 damage, and may cause paralysis.",
    effects.OpposedRoll( on_success = (
        effects.HealthDamage( (6,8,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_COLD, anim=animobs.BlueExplosion ),
        effects.Paralyze( max_duration = 3 )
    ,), on_failure = (
        effects.HealthDamage( (2,12,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_COLD, anim=animobs.BlueExplosion )
    ,) ), rank=6, gems={LUNAR:2,WATER:1}, com_tar=targetarea.Blast(radius=2),
    ai_tar=invocations.TargetEnemy(min_distance=3),shot_anim=animobs.BlueComet )


# CIRCLE SEVEN

SUMMONING = Spell( "Summoning",
    "This spell opens a portal to the nether realms and calls forth a powerful creature for you to command.",
    effects.CallMonster( {(context.MTY_UNDEAD,context.MTY_DEMON): True, context.DES_LUNAR: context.MAYBE, context.GEN_UNDEAD: context.MAYBE}, 14, anim=animobs.PurpleSparkle ),
    rank=7, gems={EARTH:2,LUNAR:3}, com_tar=targetarea.SingleTarget(reach=3), ai_tar=invocations.TargetEmptySpot(), mpfudge=13 )

DEEP_DROWNING = Spell( "Deep Drowning",
    "Conjures a turbulent water vortex in a small area. Enemies trapped inside take 4d12 water damage and may drown.",
    effects.HealthDamage( (4,12,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_WATER, anim=animobs.Bubbles, on_success=(
        effects.TargetIs( effects.CAN_DROWN, on_true=(
            effects.OpposedRoll( def_stat=stats.TOUGHNESS, on_success = (
                effects.InstaKill( anim=animobs.CriticalHit ),
            )),
github jwvhewitt / dmeternal / spells / firespells.py View on Github external
# CIRCLE EIGHT

    # Army of Fire

# CIRCLE NINE

NUCLEAR = Spell( "Nuclear",
    "This spell causes a massive explosion, doing 20d6 atomic damage to all targets in a 4 tile radius.",
    effects.OpposedRoll( on_success = (
        effects.HealthDamage( (20,6,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_ATOMIC, anim=animobs.Nuclear )
    ,), on_failure = (
        effects.HealthDamage( (10,6,0), stat_bonus=None, element=stats.RESIST_ATOMIC, anim=animobs.Nuclear )
    ,) ), rank=9, gems={FIRE:5}, com_tar=targetarea.Blast(radius=4), shot_anim=animobs.Fireball,
    ai_tar=invocations.TargetEnemy(min_distance=5) )