package effect import ( "blazing/logic/service/fight/info" "blazing/logic/service/fight/input" ) // Effect 469: {0}回合内若对手使用属性技能则{1}%概率令对手{2} type Effect469 struct { RoundEffectArg0Base } func (e *Effect469) Skill_Use_ex() bool { if e.Ctx().SkillEntity != nil && e.Ctx().SkillEntity.Category() == info.Category.STATUS { chance := e.Args()[1].IntPart() // n% success, _, _ := e.Input.Player.Roll(int(chance), 100) if success { effectType := int(e.Args()[2].IntPart()) // XX类型 statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, effectType) if statusEffect != nil { e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect) } } } return true } func init() { input.InitEffect(input.EffectType.Skill, 469, &Effect469{}) input.InitEffect(input.EffectType.Skill, 526, &Effect526{}) } // Effect 526: {0}回合内若对手成功使用属性技能则受到{1}点固定伤害 type Effect526 struct { RoundEffectArg0Base } func (e *Effect526) Skill_Use_ex() bool { if e.Ctx().SkillEntity != nil && e.Ctx().SkillEntity.Category() == info.Category.STATUS { e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{ Type: info.DamageType.Fixed, Damage: e.Args()[0], }) } return true }