public override void Effect(RoleBase self, RoleBase[] target) { if (self.isFight) { self.AddMp(value); } }
void UseSkill(dynamic dy = null) { var playerModel = ModelManager.Get <PlayerModel>("PlayerModel"); var fightRoles = playerModel.fightRoles; List <RoleBase> roles = new List <RoleBase>(); foreach (var role in fightRoles) { if (role != null) { roles.Add(role); } } if (roles.Count > 0) { int index = UnityEngine.Random.Range(0, roles.Count); RoleBase choseRole = roles[index]; choseRole.AddMp((int)choseRole.attributes[6]); ViewManager.Get <WndTips>("WndTips").ShowMsg("一技之长", choseRole.fightTipPosition, UnityEngine.Color.yellow, 1); } }
void AddMp(int id) { foreach (RoleBase role in tempRoles) { if (role.isFight) { role.AddMp(valueParam[effectIndex]); } } }