public CreatureEffect_FaceAttacher MakeFaceEffect(BattleUnitView target) { CreatureEffect_FaceAttacher effectFaceAttacher = this.MakeEffect("3/RedShoes_Attract", apply: false) as CreatureEffect_FaceAttacher; effectFaceAttacher.AttachTarget(target); return(effectFaceAttacher); }
public override void OnRoundStart() { if (!(this._owner.bufListDetail.GetActivatedBufList().Exists(x => x is Eager))) { this._owner.bufListDetail.AddBuf(new Eager()); SoundEffectPlayer.PlaySound("Creature/RedShoes_On"); CreatureEffect_FaceAttacher effectFaceAttacher = this.MakeFaceEffect(this._owner.view); effectFaceAttacher.SetLayer("Character"); if (!(bool)(UnityEngine.Object)effectFaceAttacher) { return; } this._faceEffect.Add(effectFaceAttacher); } List <BattleUnitModel> alive = BattleObjectManager.instance.GetAliveList(this._owner.faction == Faction.Player ? Faction.Enemy : Faction.Player); foreach (BattleUnitModel member in alive) { if (member.bufListDetail.GetActivatedBufList().Exists(x => x is TheChosen)) { return; } } RandomUtil.SelectOne <BattleUnitModel>(alive).bufListDetail.AddBuf(new TheChosen()); }