Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)

src/l/a/Lampost-Mud-HEAD/lampost/lpflavor/entity.py   Lampost-Mud(Download)
from lampost.context.resource import m_requires
from lampost.gameops.action import action_handler, ActionError
from lampost.lpflavor.fight import Fight
from lampost.lpflavor.attributes import need_refresh, POOL_LIST
from lampost.lpflavor.combat import calc_consider
            del self._refresh_pulse
            return
        for pool_id, base_pool_id in POOL_LIST:
            new_value = getattr(self, pool_id) + self._refresher[pool_id]
            setattr(self, pool_id, min(new_value, getattr(self, base_pool_id)))
    def display_status(self):
        display_status = super(EntityLP, self).display_status
        for pool_id, base_pool_id in POOL_LIST:
            display_status[pool_id] = getattr(self, pool_id)
            display_status[base_pool_id] = getattr(self, base_pool_id)
        return display_status
 
    def combat_status(self):
        return ''.join(['{N} STATUS--', ''.join(["{0}: {1} ".format(pool_id, getattr(self, pool_id))
                                                 for pool_id, _ in POOL_LIST])])

src/l/a/Lampost-Mud-HEAD/lampost/lpflavor/combat.py   Lampost-Mud(Download)
from lampost.gameops.display import COMBAT_DISPLAY
from lampost.gameops.target import TargetClass
from lampost.lpflavor.attributes import POOL_LIST
from lampost.lpflavor.skill import BaseSkill, roll_calc, SkillTemplate, avg_calc
from lampost.mud.action import mud_action
    except ValueError:
        best_defense = 0
    pool_levels = sum(getattr(entity, base_pool_id, 0) for pool_id, base_pool_id in POOL_LIST)
    return int((best_attack + best_defense + pool_levels) / 2)