@LabelIndex 38433
@StringIndex 0
class 0 royal_rush_bomb : warrior {
parameter:
	int	SelfRangeDDMagic = 277348353;
	int	SelfRangeDDMagicRate = 33;
	int	DDMagicUseHpRate = 30;

handler:
	EventHandler ATTACKED(attacker,damage) {
		if( gg::Rand(100) < SelfRangeDDMagicRate && gg::FloatToInt(( ( myself.sm.hp / myself.sm.max_hp ) * 100 )) < DDMagicUseHpRate ) {
			if( myself::Skill_GetConsumeMP(SelfRangeDDMagic) < myself.sm.mp && myself::Skill_GetConsumeHP(SelfRangeDDMagic) < myself.sm.hp && myself::Skill_InReuseDelay(SelfRangeDDMagic) == 0 ) {
				myself::AddUseSkillDesire(myself.sm,SelfRangeDDMagic,0,1,1000000);
			}
		}
		super;
	}

	EventHandler USE_SKILL_FINISHED(target,skill_name_id) {
		myself::Despawn();
	}

}
