@LabelIndex 14393
@StringIndex 0
class 0 warrior_ag_casting_enchant_1of4 : warrior_casting_enchant_1of4 {
handler:
	EventHandler SEE_CREATURE(creature) {
		if( myself::GetLifeTime() > 7 && myself::InMyTerritory(myself.sm) ) {
			if( myself.i_ai1 == 0 && gg::Rand(100) < 33 && gg::FloatToInt(( ( myself.sm.hp / myself.sm.max_hp ) * 100 )) > 50 ) {
				if( myself::Skill_GetConsumeMP(myself.i_ai0) < myself.sm.mp && myself::Skill_GetConsumeHP(myself.i_ai0) < myself.sm.hp && myself::Skill_InReuseDelay(myself.i_ai0) == 0 ) {
					myself::AddUseSkillDesire(myself.sm,myself.i_ai0,1,1,1000000);
				}
			}
			myself.i_ai1 = 1;
		}
		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;
	}

}
