void AttackTo(BaseHero from, BaseHero hero) { from.ReduceHP(expend, true); hero.ReduceHP(attackHP); UnityTools.Log(from.name + " 使用 " + name + " 攻击 " + hero.name + " 造成 " + attackHP + " 点伤害,消耗 " + expend + "点血量"); HeroAction treatAction = new HeroAction(); treatAction.action = HeroActionType.Skill; SkillAction skillAction = new SkillAction(); skillAction.action = SkillActionType.MiniHP; skillAction.args = new object[] { expend }; treatAction.args = new object[] { from, hero, this, skillAction }; from.AddAction(treatAction); HeroAction treatAction1 = new HeroAction(); treatAction1.action = HeroActionType.Skill; SkillAction skillAction1 = new SkillAction(); skillAction1.action = SkillActionType.MiniHP; skillAction1.args = new object[] { attackHP }; treatAction1.args = new object[] { from, hero, this, skillAction1 }; hero.AddAction(treatAction1); }
void AttackTo(BaseHero from, BaseHero hero) { from.ReduceMP(expend); hero.ReduceHP(attackHP); UnityTools.Log(from.name + " 使用 " + name + " 攻击 " + hero.name + " 造成 " + attackHP + " 点伤害,眩晕" + dizzDuration + "毫秒,消耗 " + expend + "点MP"); HeroAction treatAction = new HeroAction(); treatAction.action = HeroActionType.Skill; SkillAction skillAction = new SkillAction(); skillAction.action = SkillActionType.MiniMP; skillAction.args = new object[] { expend }; treatAction.args = new object[] { from, hero, this, skillAction }; from.AddAction(treatAction); HeroAction treatAction1 = new HeroAction(); treatAction1.action = HeroActionType.Skill; SkillAction skillAction1 = new SkillAction(); skillAction1.action = SkillActionType.MiniHP; skillAction1.args = new object[] { attackHP }; treatAction1.args = new object[] { from, hero, this, skillAction1 }; hero.AddAction(treatAction1); Buff buff = new Buff(); buff.type = BuffType.Dizzy; buff.start = now; buff.duration = dizzDuration; hero.AddBuff(buff); }
void ChangeTo(BaseHero from) { UnityTools.Log(from.name + " 对 " + from.name + " 使用 " + name); HeroAction treatAction1 = new HeroAction(); treatAction1.action = HeroActionType.Skill; treatAction1.args = new object[] { from, null, this }; from.AddAction(treatAction1); Buff buff = new Buff(); buff.type = BuffType.Change1; buff.start = now; buff.duration = changeDuration; from.AddBuff(buff); }
void SlowTo(BaseHero from, BaseHero hero) { UnityTools.Log(from.name + " 对 " + hero.name + " 使用 " + name); HeroAction treatAction1 = new HeroAction(); treatAction1.action = HeroActionType.Skill; treatAction1.args = new object[] { from, hero, this }; hero.AddAction(treatAction1); Buff buff = new Buff(); buff.type = BuffType.Slow1; buff.start = now; buff.duration = slowDuration; buff.duration2 = giftDuration; buff.arg1 = slowPercent; buff.arg2 = liftPercent; hero.AddBuff(buff); }
void CoverTo(BaseHero from, BaseHero hero) { from.ReduceMP(expend); UnityTools.Log(from.name + " 对 " + hero.name + " 使用 " + name + "消耗 " + expend + "点MP"); HeroAction treatAction1 = new HeroAction(); treatAction1.action = HeroActionType.Skill; treatAction1.args = new object[] { from, hero, this }; hero.AddAction(treatAction1); Buff buff = new Buff(); buff.type = BuffType.Cover1; buff.start = now; buff.duration = converDuration; buff.arg1 = Fix64.Zero; buff.arg2 = converDamage; hero.AddBuff(buff); }
void AttackTo(BaseHero from, BaseHero hero) { from.ReduceMP(expend); UnityTools.Log(from.name + " 使用 " + name + " 攻击 " + hero.name + " 消耗 " + expend + "点MP"); HeroAction treatAction = new HeroAction(); treatAction.action = HeroActionType.Skill; treatAction.args = new object[] { from, hero, this }; from.AddAction(treatAction); HeroAction treatAction1 = new HeroAction(); treatAction1.action = HeroActionType.Skill; treatAction1.args = new object[] { from, hero, this }; hero.AddAction(treatAction1); Buff buff = new Buff(); buff.type = BuffType.Focus; buff.start = now; buff.duration = Fix64.One * -1; hero.AddBuff(buff); }
void AttackToAll(BaseHero from) { from.ReduceMP(expend); foreach (var hero in GameData.g_listHero) { if (hero.group == from.group) { continue; } hero.ReduceHP(attackHP); UnityTools.Log(from.name + " 使用 " + name + " 攻击 " + hero.name + " 造成 " + attackHP + " 点伤害,减甲" + reduceArmor + ",消耗 " + expend + "点MP"); HeroAction treatAction1 = new HeroAction(); treatAction1.action = HeroActionType.Skill; SkillAction skillAction1 = new SkillAction(); skillAction1.action = SkillActionType.MiniHP; skillAction1.args = new object[] { attackHP }; treatAction1.args = new object[] { from, hero, this, skillAction1 }; hero.AddAction(treatAction1); Buff buff = new Buff(); buff.type = BuffType.ReduceArmor; buff.start = now; buff.duration = reduceDuration; buff.arg1 = reduceArmor; hero.AddBuff(buff); } HeroAction treatAction = new HeroAction(); treatAction.action = HeroActionType.Skill; treatAction.args = new object[] { from, null, this }; from.AddAction(treatAction); }