class Unicorn(base.Monster): name = "Unicorn" statline = { stats.STRENGTH: 16, stats.TOUGHNESS: 18, stats.REFLEXES: 16, \ stats.INTELLIGENCE: 16, stats.PIETY: 20, stats.CHARISMA: 18, \ stats.RESIST_LUNAR: 100, stats.MAGIC_DEFENSE: 25 } SPRITENAME = "monster_animals.png" FRAME = 31 TEMPLATES = () MOVE_POINTS = 12 VOICE = None HABITAT = (context.HAB_FOREST, context.SET_EVERY, context.DES_SOLAR, context.MTY_BEAST, context.MTY_CREATURE, context.MTY_LEADER, context.MTY_BOSS, context.GEN_NATURE) ENC_LEVEL = 13 ATTACK = items.Attack((3, 6, 0), element=stats.RESIST_PIERCING) TECHNIQUES = (invocations.MPInvocation( "Radiance", effects.HealthRestore(dice=(5, 8, 20)), mp_cost=7, com_tar=targetarea.SingleTarget(reach=10), ai_tar=invocations.TargetWoundedAlly(), exp_tar=targetarea.SinglePartyMember(), shot_anim=animobs.YellowVortex), ) def init_monster(self): self.levels.append(base.Defender(12, self))
class PermaMegaRegeneration( Enchantment ): # Basically like PermaRegeneration, but moreso. def __init__( self ): super(PermaMegaRegeneration, self).__init__(dispel=()) FX = effects.TargetIsDamaged( on_true= ( effects.HealthRestore( dice=(2,6,0) ) ,))
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 PermaRegeneration( Enchantment ): # Basically like normal regeneration, but may not be dispelled. def __init__( self ): super(PermaRegeneration, self).__init__(dispel=()) FX = effects.TargetIsDamaged( on_true= ( effects.HealthRestore( dice=(1,6,0) ) ,))
class RegeneratEn( Enchantment ): NAME = "Regenerating" def __init__( self ): super(RegeneratEn, self).__init__(dispel=(MAGIC,DAILY)) FX = effects.TargetIsDamaged( on_true= ( effects.HealthRestore( dice=(1,6,0) ) ,)) MAX_USES = 10
def do_first_aid( self, explo ): # At the end of combat, help anyone who was wounded. fx = effects.HealthRestore( dice=(1,6,explo.camp.party_rank()), stat_bonus=None ) targets = list() for pc in explo.camp.party: if pc.is_alright() and hasattr( pc, "most_recent_wound" ) and pc.hp_damage > 0: targets.append( pc.pos ) del pc.most_recent_wound explo.invoke_effect( fx, None, targets )
class HealingFountain( Fountain ): HEAL_FX = effects.HealthRestore( dice=(1,6,9999), stat_bonus=None ) desctags = (context.DES_WATER,context.DES_SOLAR) def unlocked_use( self, explo ): # Perform this waypoint's special action. targets = list() for pc in explo.camp.party: if pc.is_alright(): targets.append( pc.pos ) explo.invoke_effect( self.HEAL_FX, None, targets )
class MadMonk(base.Monster): name = "Mad Monk" statline = { stats.STRENGTH: 12, stats.TOUGHNESS: 14, stats.REFLEXES: 16, \ stats.INTELLIGENCE: 12, stats.PIETY: 16, stats.CHARISMA: 10, stats.NATURAL_DEFENSE: -10, stats.MAGIC_DEFENSE: 10 } SPRITENAME = "monster_chaos.png" FRAME = 7 TEMPLATES = () MOVE_POINTS = 10 HABITAT = (context.HAB_EVERY, context.HAB_DESERT, context.SET_EVERY, context.MTY_HUMANOID, context.MTY_FIGHTER, context.MTY_PRIEST, context.DES_FIRE, context.GEN_CHAOS) ENC_LEVEL = 5 TREASURE = treasuretype.Standard((items.POTION, items.CLOTHES)) TECHNIQUES = (invocations.MPInvocation( "Fire Soul", effects.TargetIsAlly( on_true=(effects.Enchant(enchantments.RegeneratEn, anim=animobs.RedCloud), effects.TargetIsDamaged(on_true=(effects.HealthRestore( dice=(2, 6, 0)), ))), on_false=(effects.HealthDamage((2, 6, 0), stat_bonus=None, element=stats.RESIST_FIRE, anim=animobs.RedCloud), )), com_tar=targetarea.SelfCentered(radius=2, delay_from=-1), ai_tar=invocations.TargetWoundedAlly(), mp_cost=25), ) ATTACK = items.Attack((1, 8, 0), element=stats.RESIST_CRUSHING, extra_effect=effects.ManaDamage( (1, 8, 0), stat_bonus=None, anim=animobs.PurpleExplosion)) def init_monster(self): self.levels.append(base.Humanoid(5, self))
# CIRCLE 1 BLESSING = Spell( "Blessing", "Increases the physical and magic attack scores of all allies within 6 tiles by +5%. This effect lasts until the end of combat.", effects.TargetIsAlly(on_true=(effects.Enchant( enchantments.BlessingEn, anim=animobs.YellowSparkle), )), rank=1, gems={SOLAR: 1}, com_tar=targetarea.SelfCentered(), ai_tar=invocations.TargetAllyWithoutEnchantment(enchantments.BlessingEn), mpfudge=-1) MINOR_CURE = Spell("Minor Cure", "This spell will heal one nearby ally for 1-10 damage.", effects.HealthRestore(dice=(1, 10, 0)), rank=1, gems={SOLAR: 1}, com_tar=targetarea.SingleTarget(reach=1), ai_tar=invocations.TargetWoundedAlly(), exp_tar=targetarea.SinglePartyMember()) # CIRCLE 2 MODERATE_CURE = Spell("Moderate Cure", "This spell will heal one nearby ally for 6-20 damage.", effects.HealthRestore(dice=(2, 8, 4)), rank=2, gems={SOLAR: 2}, com_tar=targetarea.SingleTarget(reach=1), ai_tar=invocations.TargetWoundedAlly(),
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=(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(
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.CauseSleep(), )) ,) ), rank=5, gems={LUNAR:2}, com_tar=targetarea.Blast(radius=4), ai_tar=invocations.TargetMobileEnemy(min_distance=5) ) DEATH_RAY = Spell( "Death Ray", "This spells fires a bolt of negative energy which may kill a living target outright, or at least injure it severely.", effects.TargetIs( effects.ALIVE, on_true=( effects.OpposedRoll( att_modifier=-20, def_stat=stats.TOUGHNESS, on_success = ( effects.InstaKill( anim=animobs.CriticalHit ) ,), on_failure = ( effects.HealthDamage( (3,8,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_LUNAR, anim=animobs.PurpleExplosion ), ) ), ), on_false = ( effects.TargetIs( effects.UNDEAD, on_true=( effects.HealthRestore( dice=(3,8,0) ) ,), on_false = ( effects.HealthDamage( (3,8,0), stat_bonus=None, element=stats.RESIST_LUNAR, anim=animobs.PurpleExplosion ), ) ,), ), ), rank=5, gems={LUNAR:4}, mpfudge=-9, com_tar=targetarea.SingleTarget(), shot_anim=animobs.PurpleVortex, ai_tar=invocations.TargetEnemy() ) # CIRCLE 6 # CIRCLE 7 # CIRCLE 8 # CIRCLE 9
class LivingPotion(base.Monster): name = "Living Potion" statline = { stats.STRENGTH: 10, stats.TOUGHNESS: 10, stats.REFLEXES: 12, \ stats.INTELLIGENCE: 12, stats.PIETY: 12, stats.CHARISMA: 1, stats.RESIST_SLASHING: 25, stats.RESIST_PIERCING: 25, stats.RESIST_WATER: 200 } SPRITENAME = "monster_constructs.png" FRAME = 15 TEMPLATES = (stats.CONSTRUCT, ) MOVE_POINTS = 12 VOICE = None HABITAT = (context.SET_EVERY, context.MTY_CONSTRUCT, context.DES_WATER) ENC_LEVEL = 7 TREASURE = treasuretype.Standard((items.POTION, )) COMBAT_AI = aibrain.SteadySpellAI() ATTACK = items.Attack((1, 6, 0), element=stats.RESIST_CRUSHING) TECHNIQUES = (invocations.MPInvocation( "Acid Blast", effects.OpposedRoll(att_modifier=10, def_stat=stats.REFLEXES, on_success=(effects.HealthDamage( (2, 6, 0), stat_bonus=None, element=stats.RESIST_ACID, anim=animobs.GreenCloud), ), on_failure=(effects.HealthDamage( (1, 6, 0), stat_bonus=None, element=stats.RESIST_ACID, anim=animobs.GreenCloud), )), com_tar=targetarea.SingleTarget(), ai_tar=invocations.TargetEnemy(), shot_anim=animobs.GreenSpray, mp_cost=1), invocations.MPInvocation( "Poison Blast", effects.OpposedRoll(att_modifier=10, def_stat=stats.REFLEXES, on_success=(effects.HealthDamage( (2, 6, 0), stat_bonus=None, element=stats.RESIST_POISON, anim=animobs.PoisonCloud), ), on_failure=(effects.HealthDamage( (1, 6, 0), stat_bonus=None, element=stats.RESIST_POISON, anim=animobs.PoisonCloud), )), com_tar=targetarea.SingleTarget(), ai_tar=invocations.TargetEnemy(), shot_anim=animobs.GreenComet, mp_cost=1), invocations.MPInvocation( "Healing Potion", effects.HealthRestore(dice=(3, 8, 0)), com_tar=targetarea.SingleTarget(reach=10), ai_tar=invocations.TargetWoundedAlly(), exp_tar=targetarea.SinglePartyMember(), shot_anim=animobs.YellowVortex, mp_cost=1)) def init_monster(self): self.levels.append(base.Spellcaster(7, self))