In most RPGs I've played, there are these enemy types that only take 1 damage from everything expect critical hits, and drop a lot of loot. No matter how hard I try, I am unable to find anything about how to do this online. I want to make it so that no matter what hits an enemy, it will always deal exactly 1 damage, unless it is a critical hit. Can anyone help me out here?
Treasure Enemies.
RPG Maker VXAce SupportIf a critical hit deals 3 times the original damage, the damage formula standard won't do much good there. Instead, here's a snippet under Materials to get started:
Code:
class Game_Enemy < Game_Battler
def make_damage_value(user, item)
value = item.damage.eval(user, self, $game_variables)
value *= item_element_rate(user, item)
value *= pdr if item.physical?
value *= mdr if item.magical?
value *= rec if item.damage.recover?
value = apply_variance(value, item.damage.variance)
value = apply_guard(value)
if @result.critical
value = apply_critical(value)
else
value = 1 if @enemy_id == 1
end
@result.make_damage(value.to_i, item)
end
end
Original thread: https://forums.rpgmakerweb.com/threads/treasure-enemies.77481/