Action RPG Framework

by Forum_account
Action RPG Framework
A framework for developing action RPGs.
ID:852479
 
Not Feasible
Applies to:Dream Maker
Status: Not Feasible

Implementing this feature is not possible now or in the foreseeable future
What do you think about monsters being able to use skills at set chances? would it be possible for you to add that into the framework? or maybe a monster with ranged attacks.
you can check if(prob(what ever)) and then they shoot their secondary attack.
Enemies try to use all of their abilities every tick and are limited by cooldowns. If you want an enemy to only use an ability an average of once every five seconds, just give it a five second cooldown.

You can also handle this by making an ability that randomly does one of two things. For example:

Ability
EnemyAttack
icon_state = "melee-attack"
animation = "attacking"

can_use(mob/user)
if(user.on_cooldown("enemy-attack"))
return 0

if(!user.melee_target())
return 0

return ..()

effect(mob/user)

user.cooldown("enemy-attack", 40)

var/mob/target = user.melee_target()

if(target)

// 50% chance to deal damage
if(prob(50))
PhysicalCombat.attack(user, target, user.power)

// 50% chance to slow the target
else
new /Condition/Slowed(target, user)

target.effect("punch")
target.noise('hit-2.wav', frequency = rand(0.7, 1.3))

The ability itself is used at a set interval but it's effect is random.

You can also give each enemy a random chance to have an ability. For example:

mob/enemy
New()
..()

abilities = list()
abilities += new /Ability/EnemyAttack()

// this enemy has a 50% chance to also have the super attack.
if(prob(50))
abilities += new /Ability/SuperAttack()

The enemy will still use all of its abilities whenever it can, but by randomly assigning abilities you're creating randomness in the outcome.
Forum_account resolved issue (Not Feasible)