@tool extends Weapon func update(to: int, origin: Dictionary, _entity: EntityBase): origin["atk"] += 4 * to * soulLevel origin["rate1"] *= soulLevel origin["rate2"] *= soulLevel origin["rate3"] *= soulLevel return origin func attack(entity: EntityBase): for bullet in BulletBase.generate( ComponentManager.getBullet("Wuwei"), entity, entity.position, entity.position.angle_to_point(get_global_mouse_position()) ): if bullet is WuweiBullet: bullet.baseDamage = readStore("atk") bullet.baseDamage *= max(-0.99, readStore("rate2") * ((1.0 - entity.fields[FieldStore.Entity.ATTACK_SPEED]) * 100)) + 1 bullet.baseDamage *= max(-0.99, readStore("rate1") * (entity.fields[FieldStore.Entity.MAX_HEALTH] - entity.health)) + 1 bullet.baseDamage *= max(-0.99, readStore("rate3") * len(entity.getOrCreateCycleTimer("parry", 2000, 100).bullets)) + 1 return true