mob
enemy
// when an enemy takes damage, make them target their attacker.
took_damage(damage, mob/attacker, Combat/combat)
..()
if(!target)
target = attacker
// now we'll define a specific enemy
blue_ooze
base_state = "blue-ooze"
icon_state = "blue-ooze-standing"
shadow_state = "ooze-shadow"
power = 4
speed = 5
defense = 5
health = 40
max_health = 40
base_speed = 1
abilities = list(new /Ability/EnemyAttack())
New()
..()
money = rand(1, 10)
if(src.level <= 10)
experience = 1
else
experience = 100
// we override the died proc to give enemies a chance to drop items
died()
noise('splat.wav')
if(prob(50))
new /item/health_potion(src)
if(prob(25))
new /item/sword(src)
..()
Problem description:I'm trying to get less xp when the player get a higher level but the "if condition" doesn't work, the player always get 100 XP
Also could be that you are setting money randomly from 1 to 10 and then checking level to define experience for them.
So then I would assume you are setting level for base monsters somewhere in the chain to 10 or higher.