Example #1
0
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 ) )
Example #2
0
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 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))
Example #4
0
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))
import targetarea
import enchantments
import animobs
import stats
import invocations

# 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",
Example #6
0
    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),
    ),
                        on_failure=(effects.HealthDamage(
                            (2, 5, 0),
                            stat_bonus=stats.INTELLIGENCE,
Example #7
0
import enchantments
import animobs
import stats
import invocations
import context

# CIRCLE ONE

AIR_ARMOR = Spell(
    "Shield of Wind",
    "Increases the physical and magical defense of all allies within 6 tiles by +5%. This effect lasts until the end of combat.",
    effects.TargetIsAlly(on_true=(
        effects.Enchant(enchantments.AirArmor, anim=animobs.BlueSparkle), )),
    rank=1,
    gems={AIR: 1},
    com_tar=targetarea.SelfCentered(),
    ai_tar=invocations.TargetAllyWithoutEnchantment(enchantments.AirArmor))

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(
    rank=8,
    gems={EARTH: 4},
    com_tar=targetarea.SingleTarget(),
    ai_tar=invocations.TargetAllyWithoutEnchantment(enchantments.IronSkinEn),
    mpfudge=-2)

# CIRCLE 9

EARTHQUAKE = Spell(
    "Earthquake",
    "The land itself will attack your foes. Tremors do 12d6 crushing damage to all enemies within 8 tiles.",
    effects.TargetIsEnemy(anim=animobs.EarthBoom,
                          on_true=(effects.OpposedRoll(
                              def_stat=stats.REFLEXES,
                              on_success=(effects.HealthDamage(
                                  (12, 6, 0),
                                  stat_bonus=stats.INTELLIGENCE,
                                  element=stats.RESIST_CRUSHING,
                                  anim=animobs.RedBoom), ),
                              on_failure=(effects.HealthDamage(
                                  (3, 12, 0),
                                  stat_bonus=None,
                                  element=stats.RESIST_CRUSHING,
                                  anim=animobs.RedBoom), )), )),
    rank=9,
    gems={EARTH: 5},
    com_tar=targetarea.SelfCentered(radius=8,
                                    delay_from=-1,
                                    exclude_middle=True),
    ai_tar=invocations.TargetEnemy())
ACID_CLOUD = Spell( "Acid Cloud",
    "Calls forth billowing clouds of acid which do 2d6 damage to all targets within 3 tiles.",
    effects.OpposedRoll( on_success = (
        effects.HealthDamage( (2,6,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_ACID, anim=animobs.GreenCloud )
    ,), on_failure = (
        effects.HealthDamage( (1,6,0), stat_bonus=None, element=stats.RESIST_ACID, anim=animobs.GreenCloud )
    ,) ), rank=3, gems={EARTH:1,LUNAR:1}, com_tar=targetarea.Blast(radius=3), shot_anim=animobs.GreenComet, 
    ai_tar=invocations.TargetEnemy(min_distance=4) )

PROTECT_FROM_GOOD = Spell( "Protection from Good",
    "All allies within 6 tiles get +10% defense, +10% aura, and 50% resistance to holy damage for the duration of combat.",
    effects.TargetIsAlly( on_true = (
        effects.Enchant( enchantments.ProtectFromGoodEn, anim=animobs.PurpleSparkle ),
    )),
    rank=3, gems={LUNAR:1,WATER:1}, com_tar=targetarea.SelfCentered(),
    ai_tar=invocations.TargetAllyWithoutEnchantment(enchantments.ProtectFromGoodEn) )


# CIRCLE FOUR

RAISE_UNDEAD = Spell( "Raise Undead",
    "You conjure dark forces to animate an undead creature which will fight on your behaf.",
    effects.CallMonster( {context.MTY_UNDEAD: True, context.DES_LUNAR: context.MAYBE, context.GEN_UNDEAD: context.MAYBE}, 8, anim=animobs.PurpleSparkle ),
    rank=4, gems={EARTH:1,LUNAR:2}, com_tar=targetarea.SingleTarget(reach=2), ai_tar=invocations.TargetEmptySpot(), mpfudge=6 )

ICE_WEAPON = Spell( "Icy Weapon",
    "One ally's weapon will glow with magical cold, causing an extra 1-10 points of damge per hit and potentially freezing enemies solid. This effect lasts until the end of combat.",
    effects.Enchant( enchantments.FrostWepEn, anim=animobs.PurpleSparkle ),
    rank=4, gems={LUNAR:1,WATER:1}, com_tar=targetarea.SinglePartyMember(),
    ai_tar=invocations.TargetAllyWithoutEnchantment(enchantments.FrostWepEn) )
Example #10
0
        effects.HealthDamage( (2,4,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_COLD, anim=animobs.BlueBoom ),
        effects.HealthDamage( (2,4,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_LIGHTNING, anim=animobs.BlueZap ),
        effects.HealthDamage( (2,4,0), stat_bonus=stats.INTELLIGENCE, element=stats.RESIST_ACID, anim=animobs.GreenSplat )
    ), on_failure = (
        effects.HealthDamage( (2,4,0), stat_bonus=None, element=stats.RESIST_FIRE, anim=animobs.OrangeExplosion ),
        effects.HealthDamage( (2,4,0), stat_bonus=None, element=stats.RESIST_COLD, anim=animobs.BlueBoom ),
        effects.HealthDamage( (2,4,0), stat_bonus=None, element=stats.RESIST_LIGHTNING, anim=animobs.BlueZap ),
        effects.HealthDamage( (2,4,0), stat_bonus=None, element=stats.RESIST_ACID, anim=animobs.GreenSplat )
    ) ), rank=5, gems={FIRE:2,SOLAR:1}, com_tar=targetarea.Blast(radius=3), shot_anim=animobs.CrystalBall, 
    ai_tar=invocations.TargetEnemy(min_distance=4) )

TRANSFORMATION = Spell( "Transformation",
    "Transforms all allies within six tiles, providing +10% to defense plus 25% resistance to slashing, crushing, and piercing damage.",
    effects.TargetIsAlly( on_true = (
        effects.Enchant( enchantments.WoodSkinEn, anim=animobs.OrangeSparkle ),
    )), rank=5, gems={EARTH:3,FIRE:1}, com_tar=targetarea.SelfCentered(),
    ai_tar=invocations.TargetAllyWithoutEnchantment(enchantments.WoodSkinEn) )


# CIRCLE SIX

CALL_BEHEMOTH = Spell( "Call Behemoth",
    "This spell will summon a very powerful 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}, 12, anim=animobs.OrangeSparkle ),
    rank=6, gems={EARTH:2,SOLAR:2}, com_tar=targetarea.SingleTarget(reach=2), ai_tar=invocations.TargetEmptySpot(), mpfudge = 12 )


# CIRCLE SEVEN

CALL_COLOSSUS = Spell( "Call Colossus",
    "This spell will summon an extremely powerful monster to fight on your behaf.",
                         on_success=(effects.HealthDamage(
                             (1, 10, 0),
                             stat_bonus=stats.CHARISMA,
                             element=stats.RESIST_SOLAR,
                             anim=animobs.YellowExplosion), ),
                         on_failure=(effects.HealthDamage(
                             (1, 4, 0),
                             stat_bonus=None,
                             element=stats.RESIST_SOLAR,
                             anim=animobs.YellowExplosion), )), )),
    rank=2,
    gems={
        SOLAR: 1,
        WATER: 1
    },
    com_tar=targetarea.SelfCentered(radius=3, exclude_middle=True),
    mpfudge=-2,
    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))
Example #12
0
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",
    "Burns all enemies within 6 tiles with a flaming sigil, doing 2d4 damage and preventing them from hiding.",
    effects.TargetIsEnemy( on_true = (
Example #13
0
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(),
        ))