@LabelIndex 14961
@StringIndex 0
class 0 warrior_ag_casting_3skill_magical_revival : warrior_casting_3skill_magical_revival {
handler:
	EventHandler SEE_CREATURE(creature,i6) {
		if( creature.is_pc == 0 && myself::IsInCategory(12,creature.class_id) == 0 ) {
			super;
			return;
		}
		if( myself::GetLifeTime() > 7 && myself::InMyTerritory(myself.sm) && myself.p_state != 3 ) {
			i6 = gg::Rand(100);
			if( myself::DistFromMe(creature) > 100 && i6 < 33 ) {
				if( myself::Skill_GetConsumeMP(DDMagic) < myself.sm.mp && myself::Skill_GetConsumeHP(DDMagic) < myself.sm.hp && myself::Skill_InReuseDelay(DDMagic) == 0 ) {
					myself::AddUseSkillDesire(creature,DDMagic,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;
	}

}
