public override void Attach(LogicUnit g, LogicUnit t) { base.Attach(g, t); if (t.type == LogicUnitType.Soldier) { soldier = (Soldier)t; if (!soldier.InStunState()) { soldier.Stun(); } soldier.debuffHandler.stunEffect = this; if (soldier.debuffHandler.stunTime <= duration) { soldier.debuffHandler.stunTime = duration; } } else { DebugUtils.LogError(DebugUtils.Type.AI_AttributeEffect, string.Format("{0} {1} can't handle {2} {3} now!", t.type, t.id, type, attributeAffectType)); } }