Hello!
I am working on a top down 2D shooter and I want to implement some RPG elements into it, like spells. But the problem is I don’t know how to tackle this problem.
My game has 4 diffrent classes which are: mage, knight, archer and monk, these classes will all have 4 diffrent spells they can use.
Every spell will have a resource cost (mana or energy), cooldown, and time to cast it.
For example I want the mage class to have these 4 spells: blink, fireball which explodes on impact, an area of effect spell which freezes nearby enemies and a spell which simply does damage to an enemy when it touches an enemy.
But the knight class would have spells such as: swing your sword in front of you in a big radius, an area of effect spell, a charge spell where you travel forward and a buff spell where your defense stat increases.
What I’m trying to say is that all of my 4 classes will be diffrent from each other and they all will have diffrent spells, I don’t know how to implement this spell system.
I’ve already made a character class system like this:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(fileName ="ClassData", menuName ="Class Data")]
public class Class : ScriptableObject
{
public string className;
[Header("Class Stats")]
public int maximumHealth;
public int maximumResource;
public int resourceRegenerationAmount;
public int defense;
public float movementSpeed;
}
Hopefully I haven’t made things hard to understand. If so please ask if anything is unclear.
Any kind of help is appreciated!