evennia.contrib.rpg.buffs.samplebuffs

class evennia.contrib.rpg.buffs.samplebuffs.Exploit(handler, buffkey, cache)[source]

Bases: evennia.contrib.rpg.buffs.buff.BaseBuff

key = 'exploit'
name = 'Exploit'
flavor = "You are learning your opponent's weaknesses."
duration = -1
maxstacks = 20
triggers = ['hit']
stack_msg = {1: "You begin to notice flaws in your opponent's defense.", 10: "You've begun to match the battle's rhythm.", 20: "You've found a gap in the guard!"}
conditional(*args, **kwargs)[source]

Hook function for conditional evaluation.

This must return True for a buff to apply modifiers, trigger effects, or tick.

at_trigger(trigger: str, *args, **kwargs)[source]

Hook for the code you want to run whenever the effect is triggered. Passes the trigger string to the function, so you can have multiple triggers on one buff.

class evennia.contrib.rpg.buffs.samplebuffs.Exploited(handler, buffkey, cache)[source]

Bases: evennia.contrib.rpg.buffs.buff.BaseBuff

key = 'exploited'
name = 'Exploited'
flavor = "You have sensed your target's vulnerability, and are poised to strike."
duration = 30
mods = [<evennia.contrib.rpg.buffs.buff.Mod object>]
at_post_check(*args, **kwargs)[source]

Hook function to run after this buff’s mods are checked.

at_remove(*args, **kwargs)[source]

Hook function to run when this buff is removed from an object.

class evennia.contrib.rpg.buffs.samplebuffs.Leeching(handler, buffkey, cache)[source]

Bases: evennia.contrib.rpg.buffs.buff.BaseBuff

key = 'leeching'
name = 'Leeching'
flavor = 'Attacking this target fills you with vigor.'
duration = 30
triggers = ['taken_damage']
at_trigger(trigger: str, attacker=None, damage=None, *args, **kwargs)[source]

Hook for the code you want to run whenever the effect is triggered. Passes the trigger string to the function, so you can have multiple triggers on one buff.

class evennia.contrib.rpg.buffs.samplebuffs.Poison(handler, buffkey, cache)[source]

Bases: evennia.contrib.rpg.buffs.buff.BaseBuff

key = 'poison'
name = 'Poison'
flavor = 'A poison wracks this body with painful spasms.'
duration = 120
maxstacks = 5
tickrate = 5
dmg = 5
playtime = True
at_pause(*args, **kwargs)[source]

Hook for when this buff is paused

at_unpause(*args, **kwargs)[source]

Hook for when this buff is unpaused.

at_tick(initial=True, *args, **kwargs)[source]

Hook for actions that occur per-tick, a designer-set sub-duration. initial tells you if it’s the first tick that happens (when a buff is applied).

class evennia.contrib.rpg.buffs.samplebuffs.Sated(handler, buffkey, cache)[source]

Bases: evennia.contrib.rpg.buffs.buff.BaseBuff

key = 'sated'
name = 'Sated'
flavor = 'You have eaten a great meal!'
duration = 180
maxstacks = 3
mods = [<evennia.contrib.rpg.buffs.buff.Mod object>]
class evennia.contrib.rpg.buffs.samplebuffs.StatBuff(handler, buffkey, cache={})[source]

Bases: evennia.contrib.rpg.buffs.buff.BaseBuff

Customize the stat this buff affects by feeding a list in the order [stat, mod, base, perstack] to the cache argument when added

key = 'statbuff'
name = 'statbuff'
maxstacks = 0
refresh = True
unique = False
cache = {'modgen': ['foo', 'add', 0, 0]}
__init__(handler, buffkey, cache={}) → None[source]

Args: handler: The handler this buff is attached to buffkey: The key this buff uses on the cache cache: The cache dictionary (what you get if you use handler.buffcache.get(key))

flavor = 'This buff affects the following stats: {stats}'