development infernusrpg

Adding combat system to infernusrpg

The design of the classes for the combat system is as follows:

-library/ stores the constants of the strength,dexterity,hp and speed for each enemy or for the player.

const SPEED: int = 100
const STRENGTH: int = 1
const DEXTERITY: int = 3
const HP: int = 10

-library/ make the calculations for the attack and for roll a dice

func roll(number:int ,type:int  )->int:           
	var acc=0
	for x in range(0,number):                    
		acc += _rng.randi_range(1,type)                 
	return acc

-sprites/ it serves to store some instance variables of each sprite

var ar:int
var dr:int
var hp:int

func _init():

-scenes/main/PCAttack and scenes/main/EnemyAttack make the calls to the combat system


infernusrpg is a rpg turn-based demo game or prototype made in godot. you can download the source code at


Leave a Reply

Your email address will not be published. Required fields are marked *