public bool IsAdvantage() { switch (this.effect_type) { case SkillEffectTypes.Attack: case SkillEffectTypes.Debuff: case SkillEffectTypes.RateDamage: case SkillEffectTypes.RateDamageCurrent: return(false); case SkillEffectTypes.FailCondition: return(this.target == ESkillTarget.Self || this.target == ESkillTarget.SelfSide); case SkillEffectTypes.SetTrick: if (!string.IsNullOrEmpty(this.TrickId)) { TrickParam trickParam = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.GetTrickParam(this.TrickId); if (trickParam != null && trickParam.DamageType == eTrickDamageType.DAMAGE) { return(false); } break; } break; } return(true); }
private void setup(string iname, int grid_x, int grid_y, string tag, Unit creator, int create_clock, int rank, int rankcap) { if (string.IsNullOrEmpty(iname)) { return; } GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); if (!UnityEngine.Object.op_Implicit((UnityEngine.Object)instanceDirect)) { return; } this.mTrickParam = instanceDirect.MasterParam.GetTrickParam(iname); if (this.mTrickParam == null) { return; } this.mRankCap = (OInt)Math.Max(rankcap, 1); this.mRank = (OInt)Math.Min(rank, (int)this.mRankCap); this.mBuffEffect = BuffEffect.CreateBuffEffect(instanceDirect.MasterParam.GetBuffEffectParam(this.mTrickParam.BuffId), (int)this.mRank, (int)this.mRankCap); this.mCondEffect = CondEffect.CreateCondEffect(instanceDirect.MasterParam.GetCondEffectParam(this.mTrickParam.CondId), (int)this.mRank, (int)this.mRankCap); this.mCreateUnit = creator; this.mGridX = (OInt)grid_x; this.mGridY = (OInt)grid_y; this.mTag = tag; this.mRestActionCount = this.mTrickParam.ActionCount; this.mCreateClock = (OInt)create_clock; this.mValid = (OBool)true; }
public void SetTrick(TrickParam trick_param) { this.SetActive(this.HealValue, false); this.SetActive(this.DamageValue, false); this.SetActive(this.CriticalRate, false); this.SetActive(this.HitRate, false); this.SetActive(this.AttackInfoPlate, false); this.mSelectedUnit = (Unit)null; DataSource.Bind <TrickParam>(((Component)this).get_gameObject(), trick_param); GameParameter.UpdateAll(((Component)this).get_gameObject()); }
private static void addTargetAreaEff(int grid_x, int grid_y, TrickData trick_data, List <Unit> target_lists) { if (trick_data == null || target_lists == null) { return; } TrickParam mTrickParam = trick_data.mTrickParam; if (!mTrickParam.IsAreaEff) { return; } SceneBattle instance = SceneBattle.Instance; if (!UnityEngine.Object.op_Implicit((UnityEngine.Object)instance)) { return; } BattleCore battle = instance.Battle; if (battle == null) { return; } GridMap <bool> scopeGridMap = battle.CreateScopeGridMap(grid_x, grid_y, mTrickParam.EffShape, (int)mTrickParam.EffScope, (int)mTrickParam.EffHeight); if (scopeGridMap == null) { return; } for (int x = 0; x < scopeGridMap.w; ++x) { for (int y = 0; y < scopeGridMap.h; ++y) { if (scopeGridMap.get(x, y)) { Unit unitAtGrid = battle.FindUnitAtGrid(x, y); if (unitAtGrid != null && !target_lists.Contains(unitAtGrid) && trick_data.checkTarget(unitAtGrid, true)) { target_lists.Add(unitAtGrid); } } } } }
public Data(TrickData _data) { this.data = _data; this.param = _data.TrickParam; }