public virtual void Init(BaseSkill baseSkill) { this.name = baseSkill.name; AnimationStateName = baseSkill.AnimationStateName; SkillIcon = baseSkill.SkillIcon; MinRangeValue = baseSkill.MinRangeValue; MaxRangeValue = baseSkill.MaxRangeValue; SkillMode = baseSkill.SkillMode; DamageType = baseSkill.DamageType; DamageMultiple = baseSkill.DamageMultiple; TargetType = baseSkill.TargetType; AOEValue = baseSkill.AOEValue; IsIgnoreSelf = baseSkill.IsIgnoreSelf; SkillDuration = baseSkill.SkillDuration; TurnCD = baseSkill.TurnCD; MoveToTarget = baseSkill.MoveToTarget; CurrentCD = 0; Description = baseSkill.Description; IsSelfOnly = baseSkill.IsSelfOnly; IsAppendDamageOnRoute = baseSkill.IsAppendDamageOnRoute; EffectsReceiver = baseSkill.EffectsReceiver; EffectOnHit = baseSkill.EffectOnHit; EffectOnSelf = baseSkill.EffectOnSelf; EffectOnTarget = baseSkill.EffectOnTarget; }
public void ReSet() { StartPos = Vector2.zero; StartTime = 0; EndPos = Vector2.zero; skillmode = SkillMode.Normal; PathLength = 0; }
// Update is called once per frame void Update() { //R2おしたmagic if (Input.GetKeyDown(KeyCode.JoystickButton5) == true && mode == Mode.Magic) { animator.SetTrigger("Magic1"); } //R2 sword if (Input.GetKeyDown(KeyCode.JoystickButton5) == true && mode == Mode.Sword) { animator.SetTrigger("Sword1"); } //R1 if (Input.GetKeyDown(KeyCode.JoystickButton14) == true) { skill_mode = SkillMode.Right; } //L1 if (Input.GetKeyDown(KeyCode.JoystickButton3) == true) { skill_mode = SkillMode.Left; } //△ボタン武器持ち替え if (Input.GetKeyDown(KeyCode.JoystickButton2) == true) { SwitchWeapon(); } //□ボタン if (Input.GetKeyDown(KeyCode.JoystickButton0) == true) { UseSkill(select_number); } //×ボタン if (Input.GetKeyDown(KeyCode.JoystickButton1) == true) { } //L3ボタン if (Input.GetKeyDown(KeyCode.JoystickButton11) == true) { } //R3ボタン if (Input.GetKeyDown(KeyCode.JoystickButton10) == true) { } AxisButtonUpdate(); }
public int GetNextSkill(ScriptInterface bot, out SkillMode mode) { if (cIndex >= Skills.Count) { cIndex = 0; } SimpleSkill skill = Skills[cIndex]; cIndex++; mode = SkillMode.Optimistic; return(skill.Index); }
public EasySectionArg(float hintDistance, float toleranceDistance, float fireDistance, float qteActiveDistance, float qteFireDistance, float timeOut) { HintDistance = hintDistance; ToleranceDistance = toleranceDistance; FireDistance = fireDistance; QteActiveDistance = qteActiveDistance; QteFireDistance = qteFireDistance; TimeOut = timeOut; StartPos = Vector2.zero; StartTime = 0; EndPos = Vector2.zero; skillmode = SkillMode.Normal; PathLength = 0; }
/// public EasySectionArg() { HintDistance = 20f; ToleranceDistance = 40f; FireDistance = 50f; QteActiveDistance = 80f; QteFireDistance = 10f; TimeOut = 2000f; StartPos = Vector2.zero; StartTime = 0; EndPos = Vector2.zero; skillmode = SkillMode.Normal; PathLength = 0; }
public Game(GameMode GameMode, HeroMode HeroMode, SkillMode SkillMode, List <String> AdditionalModes) { this.GameMode = GameMode; this.HeroMode = HeroMode; this.SkillMode = SkillMode; this.AdditionalModes = AdditionalModes; if (File.Exists("bans.txt")) { string[] bans = File.ReadAllLines("bans.txt"); Bans = bans.ToList(); } Players.AfterAdd += new EventfulDictionary <string, Player> .DataChangedEventHandler(Players_AfterAdd); Players.AfterRemove += new EventfulDictionary <string, Player> .DataChangedEventHandler(Players_AfterRemove); }
public int GetNextSkill(ScriptInterface bot, out SkillMode mode) { if (cIndex >= Skills.Count) { cIndex = 0; } SimpleSkill skill = Skills[cIndex]; cIndex++; if (!skill.Rule.ShouldUse(bot)) { return(GetNextSkill(bot, out mode)); } mode = SkillMode.Optimistic; return(skill.Index); }
// Update is called once per frame void Update() { Buttons(); ChangeColorButton(); //R1 if (Input.GetKeyDown(KeyCode.JoystickButton14) == true) { skill_mode = SkillMode.Right; } //L1 if (Input.GetKeyDown(KeyCode.JoystickButton3) == true) { skill_mode = SkillMode.Left; } }
public void Load(string skills) { string[] commands = skills.ToLower().Trim().Split('|'); foreach (string command in commands) { if (command.Contains("reset")) { if (command.Contains("true")) { ResetOnTarget = true; } } else if (command.Contains("mode")) { if (command.Contains("opt")) { Mode = SkillMode.Optimistic; } } else if (command.Contains("timeout")) { continue; } else { int.TryParse(command.Trim().Substring(0, 1), out int skill); string useRules; if (command.Trim().Length <= 1) { useRules = ""; } else { useRules = command.Substring(2).Trim(); } Root.Skills.Add(skill); Root.UseRule.Add(useRules); } } }
public void ChangeSkillMode() { int curIndex = (int)currentSkillMode + 1; if (curIndex > lastSkillIndex) { curIndex = 0; } currentSkillMode = (SkillMode)curIndex; if (currentSkillMode == SkillMode.Area) { _playerManipulationArea.SetVisible(true); Move(_playerManipulationArea.transform, 1f, isItem: false); } else { _playerManipulationArea.SetVisible(false); } }
public int GetNextSkill(ScriptInterface bot, out SkillMode mode) { mode = Mode; return(Root.GetNextSkill(bot)); }
public unsafe void BroadcastSkillCast(SkillArg arg, SkillMode mode) { Map.Map map = MapManager.Instance.GetMap(arg.Caster.MapInstanceID); if (map == null) { return; } UpdateEvent evt; if (mode == SkillMode.End) { if (arg.AffectedActors.Count == 0 && (arg.Skill.BaseData.SkillType != SkillType.Single)) { evt = new UpdateEvent() { Actor = arg.Caster, UpdateType = UpdateTypes.Effect, Target = arg.Target, SkillSession = arg.SkillSession, Skill = arg.Skill, SkillAttackResult = SkillAttackResult.Normal }; map.SendEventToAllActorsWhoCanSeeActor(MapEvents.EVENT_BROADCAST, evt, arg.Caster, true); } foreach (SkillAffectedActor i in arg.AffectedActors) { if (i.BonusAdditionID == 0) { evt = new UpdateEvent() { Actor = arg.Caster, UpdateType = UpdateTypes.Effect, Target = i.Target, SkillSession = arg.SkillSession, Skill = arg.Skill, SkillAttackResult = i.Result }; map.SendEventToAllActorsWhoCanSeeActor(MapEvents.EVENT_BROADCAST, evt, arg.Caster, true); } if (i.Damage > 0 || i.Target.HP == 0) { evt = new UpdateEvent() { Actor = arg.Caster, Skill = arg.Skill, AdditionID = i.BonusAdditionID, SkillSession = arg.SkillSession, Target = i.Target, UpdateType = UpdateTypes.Actor }; int damage = i.Damage; if (!i.NoDamageBroadcast) { byte[] buf = new byte[6]; fixed(byte *res = buf) { res[0] = 2; *(int *)&res[1] = damage; res[5] = 0; } evt.UserData = buf; } evt.AddActorPara(Common.Packets.GameServer.PacketParameter.HP, i.Target.HP); if (i.Target.HP <= 0 && !(i.Target.Status.Dead && !i.Target.Status.Dying)) { i.Target.Status.Dead = true; //evt.AddActorPara(Common.Packets.GameServer.PacketParameter.Dead, i.Target.ActorType == ActorType.PC ? (i.Target.Status.Dying ? 1 : 2) : 1); map.SendEventToAllActorsWhoCanSeeActor(MapEvents.EVENT_BROADCAST, evt, arg.Caster, true); ((BNSActorEventHandler)i.Target.EventHandler).OnDie(arg.Caster); if (arg.Caster is ActorPC pc) { if (pc.Tasks.TryGetValue("CombatStatusTask", out Task task)) { task.DueTime = 10000; task.Activate(); } } } else { map.SendEventToAllActorsWhoCanSeeActor(MapEvents.EVENT_BROADCAST, evt, arg.Caster, true); } } } if (arg.ActivationIndex >= arg.Skill.BaseData.ActivationTimes.Count) { HandleAfterSkillActivate(arg); } } evt = new UpdateEvent() { Actor = arg.Caster, SkillSession = arg.SkillSession, UpdateType = UpdateTypes.Skill, Target = arg.Target, Skill = arg.Skill, SkillCastMode = arg.CastMode, X = arg.X, Y = arg.Y, Z = arg.Z }; evt.SkillSession = arg.SkillSession; evt.UserData = arg.ActivationIndex; if (mode == SkillMode.CastActionDelay) { evt.UserData = arg.ApproachTime; } if (evt.SkillCastMode != SkillCastMode.Coordinate) { switch (arg.Skill.BaseData.SkillType) { case SkillType.Single: case SkillType.Self: case SkillType.Direction: case SkillType.NoTarget: evt.SkillCastMode = SkillCastMode.Single; break; } } evt.SkillMode = mode; if (mode != SkillMode.End || (arg.ActivationIndex >= arg.Skill.BaseData.ActivationTimes.Count)) { map.SendEventToAllActorsWhoCanSeeActor(MapEvents.EVENT_BROADCAST, evt, arg.Caster, true); } if (mode == SkillMode.Activate && arg.Skill.BaseData.Duration > 0) { evt = new UpdateEvent() { Actor = arg.Caster, UpdateType = UpdateTypes.Effect, Target = arg.Target, SkillSession = arg.SkillSession, Skill = arg.Skill, SkillAttackResult = SkillAttackResult.Normal }; map.SendEventToAllActorsWhoCanSeeActor(MapEvents.EVENT_BROADCAST, evt, arg.Caster, true); } if ((mode == SkillMode.End || mode == SkillMode.DurationEnd) && arg.ActivationIndex >= arg.Skill.BaseData.ActivationTimes.Count) { arg.Caster.Status.CastingSkill = false; } }