@LabelIndex 39329
@StringIndex 0
class 0 warrior_ag_casting_ddmagic_physicalspecial : warrior_casting_ddmagic_physicalspecial {
handler:
	EventHandler SEE_CREATURE(creature) {
		if( creature.is_pc == 0 && myself::IsInCategory(12,creature.class_id) == 0 ) {
			super;
			return;
		}
		if( myself::GetLifeTime() > 7 && myself::InMyTerritory(myself.sm) && myself::IsNullCreature(myself.top_desire_target) == 1 ) {
			if( myself::DistFromMe(creature) > 200 ) {
				if( myself::Skill_GetConsumeMP(W_LongRangeDDMagic) < myself.sm.mp && myself::Skill_GetConsumeHP(W_LongRangeDDMagic) < myself.sm.hp && myself::Skill_InReuseDelay(W_LongRangeDDMagic) == 0 ) {
					myself::AddUseSkillDesire(creature,W_LongRangeDDMagic,0,1,1000000);
				}
			}
			if( creature.is_pc == 0 && myself::IsInCategory(12,creature.class_id) == 0 ) {
				return;
			}
			if( SeeCreatureAttackerTime == -1 ) {
				if( SetAggressiveTime == -1 ) {
					if( myself::GetLifeTime() >= ( gg::Rand(5) + 3 ) && myself::InMyTerritory(myself.sm) ) {
						myself::AddAttackDesire(creature,1,200);
					}
				} else if( SetAggressiveTime == 0 ) {
					if( myself::InMyTerritory(myself.sm) ) {
						myself::AddAttackDesire(creature,1,200);
					}
				} else if( myself::GetLifeTime() > ( SetAggressiveTime + gg::Rand(4) ) && myself::InMyTerritory(myself.sm) ) {
					myself::AddAttackDesire(creature,1,200);
				}
			} else if( myself::GetLifeTime() > SeeCreatureAttackerTime && myself::InMyTerritory(myself.sm) ) {
				myself::AddAttackDesire(creature,1,200);
			}
			super;
		}
	}

}
