def trigger(self, **kwargs): ttl = gametime.single_turn * rng.random_variance(10, 5) source_entity = kwargs[action.SOURCE_ENTITY] entities = source_entity.dungeon_level.value.entities for entity in entities: sight_radius_spoof = DataPoint(DataTypes.SIGHT_RADIUS, 1) darkness_effect = entityeffect.AddSpoofChild(source_entity, sight_radius_spoof, time_to_live=ttl) entity.effect_queue.add(darkness_effect)
def equipped_effect(self, entity): """ Causes the entity that equips this have a spoofed component child. """ entity.effect_queue.add( entityeffect.AddSpoofChild(entity, self.spoof_child, 1)) if self.status_icon: entity.effect_queue.add( entityeffect.StatusIconEntityEffect(entity, self.status_icon, 1))
def equipped_effect(self, entity): """ Causes seen entities to heal holder of this effect upon death. """ effect = AddEffectToOtherSeenEntities(HealAnEntityDeathFactory(entity)) entity.effect_queue.add(entityeffect.AddSpoofChild(entity, effect, 1)) entity.effect_queue.add( entityeffect.StatusIconEntityEffect(entity, LIFE_STEAL_STATUS_DESCRIPTION, 1, "life_steal_effect"))
def trigger(self, **kwargs): target_entity = kwargs[action.TARGET_ENTITY] slow_turns = random.randrange(10, 19) msg.send_global_message(messenger.FROST_POTION_DRINK_MESSAGE) target_entity.effect_queue.add( entityeffect.AddSpoofChild( None, frost_effect_factory(), slow_turns * gametime.single_turn, meld_id="frost", status_description=FROST_SLOW_STATUS_DESCRIPTION))
def effect(self, **kwargs): target_entity = kwargs["target_entity"] source_entity = kwargs["source_entity"] if not target_entity.has( Immunities.SPIDER_WEB) and target_entity.has("effect_queue"): stuck_in_web = StuckInWebStepperSpoof(self.parent) add_spoof_effect = entityeffect.AddSpoofChild(source_entity, stuck_in_web, time_to_live=1) target_entity.effect_queue.add(add_spoof_effect)
def attack_effect(self, source_entity, target_entity): return target_entity.effect_queue.add( entityeffect.AddSpoofChild(source_entity, RandomStepper(), gametime.single_turn))