class CorpseEater( base.Monster ): name = "Corpse Eater" statline = { stats.STRENGTH: 12, stats.TOUGHNESS: 14, stats.REFLEXES: 8, \ stats.INTELLIGENCE: 2, stats.PIETY: 12, stats.CHARISMA: 2 } SPRITENAME = "monster_default.png" FRAME = 13 TEMPLATES = (stats.BUG,) MOVE_POINTS = 8 VOICE = None HABITAT = ( context.HAB_EVERY, context.HAB_TUNNELS, context.SET_EVERY, context.MAP_DUNGEON, context.DES_LUNAR, context.MTY_BEAST ) ENC_LEVEL = 4 ATTACK = items.Attack( (3,4,0), element = stats.RESIST_PIERCING, extra_effect = effects.OpposedRoll( att_stat=stats.TOUGHNESS, on_success = ( effects.Paralyze( max_duration = 6 ) ,) ) ) TECHNIQUES = ( invocations.MPInvocation( "Tentacle Slime", effects.TargetIsEnemy( on_true = ( effects.OpposedRoll( anim=animobs.GreenSplat, att_stat=stats.TOUGHNESS, on_success = ( effects.Paralyze( max_duration = 3 ) ,), on_failure = ( effects.NoEffect( anim=animobs.SmallBoom ) ,) ), ) ), com_tar=targetarea.SelfCentered(radius=1,exclude_middle=True), ai_tar=invocations.TargetEnemy(), mp_cost=8 ), ) def init_monster( self ): self.levels.append( base.Beast( 4, self ) )
class Harpy( base.Monster ): name = "Harpy" statline = { stats.STRENGTH: 10, stats.TOUGHNESS: 10, stats.REFLEXES: 15, \ stats.INTELLIGENCE: 7, stats.PIETY: 12, stats.CHARISMA: 17 } SPRITENAME = "monster_default.png" FRAME = 38 TEMPLATES = () MOVE_POINTS = 8 VOICE = dialogue.voice.GREEK HABITAT = ( context.HAB_EVERY, context.HAB_CAVE, context.SET_EVERY, context.DES_LUNAR, context.MTY_HUMANOID, context.MTY_BOSS, context.GEN_CHAOS ) ENC_LEVEL = 6 TREASURE = treasuretype.Standard() ATTACK = items.Attack( (2,4,0), element = stats.RESIST_SLASHING ) TECHNIQUES = (invocations.MPInvocation( "Sleep Song", effects.TargetIsEnemy( anim=animobs.SonicHit, on_true = ( effects.TargetIs( pat=effects.ANIMAL, on_true = ( effects.OpposedRoll( att_modifier=0, on_success = ( effects.CauseSleep(), )),) ,), )), com_tar=targetarea.SelfCentered(radius=6,delay_from=-1), ai_tar=invocations.TargetMobileEnemy(), mp_cost=8 ), ) def init_monster( self ): self.levels.append( base.Humanoid( 7, self ) )
class Lamia( base.Monster ): name = "Lamia" statline = { stats.STRENGTH: 18, stats.TOUGHNESS: 12, stats.REFLEXES: 15, \ stats.INTELLIGENCE: 13, stats.PIETY: 15, stats.CHARISMA: 12 } SPRITENAME = "monster_default.png" FRAME = 2 TEMPLATES = () MOVE_POINTS = 10 VOICE = dialogue.voice.GREEK HABITAT = ( context.HAB_EVERY, context.HAB_DESERT, context.SET_EVERY, context.DES_LUNAR, context.MTY_HUMANOID, context.MTY_BOSS ) ENC_LEVEL = 7 TREASURE = treasuretype.HighItems() ATTACK = items.Attack( (1,6,0), element = stats.RESIST_SLASHING, extra_effect= effects.StatDamage( stats.PIETY, amount=4, anim=animobs.GreenBoom ) ) TECHNIQUES = ( invocations.MPInvocation( "Spirit Drain", effects.TargetIsEnemy( on_true = ( effects.OpposedRoll( on_success = ( effects.ManaDamage( (1,8,0), stat_bonus=stats.TOUGHNESS, anim=animobs.PurpleExplosion ), effects.CauseSleep() ,), on_failure = ( effects.ManaDamage( (1,8,0), stat_bonus=None, anim=animobs.PurpleExplosion ) ,)),), on_false= ( effects.NoEffect( anim=animobs.PurpleExplosion ) ,)), com_tar=targetarea.Cone(reach=4), ai_tar=invocations.TargetEnemy(), mp_cost=12 ), ) def init_monster( self ): self.levels.append( base.Humanoid( 8, self ) )
class Healer( base.Monster ): name = "Healer" statline = { stats.STRENGTH: 12, stats.TOUGHNESS: 16, stats.REFLEXES: 12, \ stats.INTELLIGENCE: 14, stats.PIETY: 18, stats.CHARISMA: 18 } SPRITENAME = "monster_spellcasters.png" FRAME = 16 TEMPLATES = () MOVE_POINTS = 10 HABITAT = ( context.HAB_EVERY, context.HAB_BUILDING, context.SET_EVERY, context.DES_CIVILIZED, context.DES_SOLAR, context.DES_WATER, context.MTY_BOSS, context.MTY_HUMANOID, context.MTY_PRIEST, context.GEN_KINGDOM ) ENC_LEVEL = 10 TREASURE = treasuretype.HighItems( ( items.potions.PotionOfHealing, items.scrolls.Rank4Scroll, items.scrolls.Rank5Scroll ) ) COMBAT_AI = aibrain.BasicTechnicalAI() COMPANIONS = (NoviceWarrior,NovicePriest,Warrior) ATTACK = items.Attack( (3,6,0), element = stats.RESIST_SOLAR, hit_anim=animobs.YellowExplosion ) TECHNIQUES = ( spells.priestspells.SMITE, spells.solarspells.MASS_CURE, spells.solarspells.MAXIMUM_CURE, invocations.MPInvocation( "Repent", effects.TargetIsAlly( on_true = ( effects.Enchant( enchantments.BlessingEn, anim=animobs.GreenSparkle ), effects.TargetIsDamaged( on_true= ( effects.HealthRestore( dice=(3,12,12) ), )) ), on_false=( effects.TargetIsEnemy( on_true = ( effects.HealthDamage( (3,12,0), stat_bonus=stats.CHARISMA, element=stats.RESIST_WATER, anim=animobs.Bubbles ), )), )), shot_anim=animobs.BlueComet, com_tar=targetarea.Blast(radius=3), ai_tar=invocations.TargetEnemy(), mp_cost=12 ) ) def init_monster( self ): self.levels.append( base.Spellcaster( 6, self ) ) self.levels.append( base.Defender( 4, self ) )
class Scarab(base.Monster): name = "Scarab" statline = { stats.STRENGTH: 13, stats.TOUGHNESS: 16, stats.REFLEXES: 14, \ stats.INTELLIGENCE: 1, stats.PIETY: 12, stats.CHARISMA: 1, stats.RESIST_SOLAR: 50 } SPRITENAME = "monster_bugs.png" FRAME = 5 TEMPLATES = (stats.BUG, ) MOVE_POINTS = 8 VOICE = None HABITAT = (context.HAB_TUNNELS, context.HAB_DESERT, context.SET_EVERY, context.DES_SOLAR, context.MTY_BEAST, context.MTY_CREATURE) ENC_LEVEL = 7 TECHNIQUES = (invocations.MPInvocation( "Draining Breath", effects.TargetIsEnemy( on_true=(effects.OpposedRoll( att_skill=stats.PHYSICAL_ATTACK, att_stat=stats.REFLEXES, def_stat=stats.REFLEXES, on_success=(effects.HealthDamage( (1, 8, 0), stat_bonus=stats.TOUGHNESS, element=stats.RESIST_FIRE, anim=animobs.PurpleExplosion), ), on_failure=(effects.HealthDamage( (1, 4, 0), stat_bonus=None, element=stats.RESIST_FIRE, anim=animobs.PurpleExplosion), )), ), on_false=(effects.NoEffect(anim=animobs.PurpleExplosion), )), com_tar=targetarea.Cone(reach=4), ai_tar=invocations.TargetEnemy(), mp_cost=3), ) ATTACK = items.Attack((1, 6, 0), element=stats.RESIST_PIERCING, extra_effect=abilities.POISON_ATTACK_2d6) def init_monster(self): self.levels.append(base.Beast(7, self))
class EarthElemental(base.Monster): name = "Earth Elemental" statline = { stats.STRENGTH: 25, stats.TOUGHNESS: 35, stats.REFLEXES: 10, \ stats.INTELLIGENCE: 12, stats.PIETY: 12, stats.CHARISMA: 12, stats.RESIST_ACID: 100 } SPRITENAME = "monster_e_earth.png" FRAME = 1 TEMPLATES = (stats.ELEMENTAL, stats.EARTH) MOVE_POINTS = 6 HABITAT = (context.HAB_EVERY, context.SET_EVERY, context.DES_EARTH, context.MTY_ELEMENTAL, context.GEN_TERRAN, context.SUMMON_ELEMENTAL) ENC_LEVEL = 12 ATTACK = items.Attack((3, 10, 0), element=stats.RESIST_CRUSHING) TECHNIQUES = (invocations.MPInvocation( "Earthquake", effects.TargetIsEnemy(anim=animobs.EarthBoom, on_true=(effects.OpposedRoll( def_stat=stats.REFLEXES, on_success=(effects.HealthDamage( (5, 6, 0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_CRUSHING, anim=animobs.RedBoom), ), on_failure=(effects.HealthDamage( (1, 12, 0), stat_bonus=None, element=stats.RESIST_CRUSHING, anim=animobs.RedBoom), )), )), mp_cost=15, com_tar=targetarea.SelfCentered(radius=8, delay_from=-1, exclude_middle=True), ai_tar=invocations.TargetEnemy()), ) def init_monster(self): self.levels.append(base.Beast(12, self))
gems={SOLAR: 3}, com_tar=targetarea.SingleTarget(reach=1), ai_tar=invocations.TargetWoundedAlly(), exp_tar=targetarea.SinglePartyMember()) # 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=(
BURNING_WEAPON = Spell( "Burning Weapon", "Magical flames burst from an ally's weapon, causing an extra 1-6 points of damge per hit. This effect lasts until the end of combat.", effects.Enchant(enchantments.FireWepEn, anim=animobs.RedSparkle), rank=1, gems={FIRE: 1}, com_tar=targetarea.SinglePartyMember(), ai_tar=invocations.TargetAllyWithoutEnchantment(enchantments.FireWepEn)) # CIRCLE 2 BLINDING_FLASH = Spell( "Blinding Flash", "A sudden flash of light will daze, and possibly stun, all enemies within 4 tiles.", effects.TargetIsEnemy(on_true=( effects.Enchant(enchantments.BlindedEn, anim=animobs.RedSparkle), effects.OpposedRoll(att_modifier=-20, on_success=(effects.Paralyze(max_duration=2), )))), rank=2, gems={FIRE: 2}, com_tar=targetarea.SelfCentered(radius=4), ai_tar=invocations.TargetEnemy()) IGNITE = Spell( "Ignite", "You touch one opponent, causing them to burst into flame. The target suffers 2d5 fire damage and may continue burning.", effects.OpposedRoll(on_success=( effects.HealthDamage((2, 5, 0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_FIRE, anim=animobs.Ignite), effects.Enchant(enchantments.BurnLowEn),
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=(effects.HealthDamage((3, 6, 0), stat_bonus=None, element=stats.RESIST_ATOMIC, anim=animobs.RedBoom), ))), on_false=(effects.NoEffect(anim=animobs.SmallBoom), )), rank=3, gems={EARTH: 2}, com_tar=targetarea.SingleTarget(reach=1), exp_tar=targetarea.SinglePartyMember(), mpfudge=-1) # CIRCLE 4 WOOD_SKIN = Spell( "Wood Skin", "Transforms a single ally, providing +10% to defense plus 25% resistance to slashing, crushing, and piercing damage.", effects.Enchant(enchantments.WoodSkinEn, anim=animobs.OrangeSparkle),
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,
# CIRCLE ONE FIRE_ARC = Spell( "Fire Arc", "Conjures an arc of intense heat which burns enemies for 1d6 damage. This spell has a short range but can affect several targets.", effects.OpposedRoll( on_success = ( effects.HealthDamage( (1,6,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_FIRE, anim=animobs.OrangeExplosion ) ,), on_failure = ( effects.HealthDamage( (1,2,0), stat_bonus=None, element=stats.RESIST_FIRE, anim=animobs.OrangeExplosion ) ,) ), rank=1, gems={FIRE:1,LUNAR:1}, com_tar=targetarea.Cone(reach=3), ai_tar=invocations.TargetEnemy() ) SHOCK_SPHERE = Spell( "Shock Sphere", "An electrical burst will deal 1-6 points of damage to all enemies within two tiles of the caster.", effects.TargetIsEnemy( on_true = ( effects.OpposedRoll( on_success = ( effects.HealthDamage( (1,6,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_LIGHTNING, anim=animobs.BlueZap ) ,), on_failure = ( effects.HealthDamage( (1,3,0), stat_bonus=None, element=stats.RESIST_LIGHTNING, anim=animobs.BlueZap ) ,) ) ,) ), rank=1, gems={AIR:1,LUNAR:1}, com_tar=targetarea.SelfCentered(radius=2,exclude_middle=True), ai_tar=invocations.TargetEnemy() ) # CIRCLE TWO LIGHTNING_BOLT = Spell( "Lightning Bolt", "This spell conjures magical lightning, which will unerringly hit one foe for 2d8 damage.", effects.HealthDamage((2,8,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_LIGHTNING, anim=animobs.BlueZap ), rank=2, gems={AIR:1,LUNAR:1}, com_tar=targetarea.SingleTarget(), shot_anim=animobs.Lightning, ai_tar=invocations.TargetEnemy(), mpfudge=-2 ) # CIRCLE THREE FIRE_SIGN = Spell( "Fire Sign",
from base import SOLAR, EARTH, WATER, FIRE, AIR, LUNAR, Spell import effects import targetarea import enchantments import animobs import stats import invocations # CIRCLE ONE CURSE = Spell( "Curse", "Decreases the physical attack score of enemies within 6 tiles by 5%. This effect lasts until the end of combat.", effects.TargetIsEnemy( on_true = ( effects.Enchant( enchantments.CurseEn, anim=animobs.PurpleSparkle ) ,) ), rank=1, gems={LUNAR:1}, com_tar=targetarea.SelfCentered(), ai_tar=invocations.TargetEnemyWithoutEnchantment(enchantments.CurseEn), mpfudge=-1 ) WIZARD_MISSILE = Spell( "Wizard Missile", "This mystic bolt always strikes its target for 1-6 damage.", effects.HealthDamage((1,6,0), stat_bonus=None, element=stats.RESIST_LUNAR, anim=animobs.PurpleExplosion ), rank=1, gems={LUNAR:1}, com_tar=targetarea.SingleTarget(), shot_anim=animobs.WizardMissile, ai_tar=invocations.TargetEnemy(), mpfudge=-1 ) # CIRCLE TWO SLEEP = Spell( "Sleep", "Causes living creatures in a 2 tile radius to fall asleep.", effects.TargetIs( pat=effects.ANIMAL, anim=animobs.PurpleSparkle, on_true = ( effects.OpposedRoll( att_modifier=0, on_success = ( effects.CauseSleep(), ))