add placeholder classes for Zone, Area, Ability, and AbilityA1
This commit is contained in:
parent
eea96ea633
commit
44d18e0168
5
scripts/Area.gd
Normal file
5
scripts/Area.gd
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
class_name Area
|
||||||
|
extends Sprite2D
|
||||||
|
|
||||||
|
|
||||||
|
# defines the parameters for spawning enemies within an area
|
5
scripts/ability.gd
Normal file
5
scripts/ability.gd
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
class_name Ability
|
||||||
|
extends Sprite2D
|
||||||
|
|
||||||
|
|
||||||
|
# basis for the 6 abilities
|
5
scripts/abilityA1.gd
Normal file
5
scripts/abilityA1.gd
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
class_name AbilityA1
|
||||||
|
extends Ability
|
||||||
|
|
||||||
|
|
||||||
|
# defines the unique characteristics of the A1 abilities
|
50
scripts/enemy.gd
Normal file
50
scripts/enemy.gd
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
class_name NPC
|
||||||
|
extends Character
|
||||||
|
|
||||||
|
|
||||||
|
enum npcDifficulties { MINION, NORMAL, ELITE, BOSS, ELITEBOSS, BBEG }
|
||||||
|
enum npcTiers { I, II, III, IV, V, VI, VII, VIII, IX, X }
|
||||||
|
|
||||||
|
@export var npcDifficulty: npcDifficulties
|
||||||
|
@export var npcTier: npcTiers
|
||||||
|
|
||||||
|
func _random_mod_health() -> void:
|
||||||
|
randomize()
|
||||||
|
# noise factor
|
||||||
|
var noise_factor = randf_range(7, 10)
|
||||||
|
self.maxHealth *= noise_factor
|
||||||
|
# difficulty factor
|
||||||
|
match self.npcDifficulty:
|
||||||
|
npcDifficulties.MINION:
|
||||||
|
self.maxHealth /= 2
|
||||||
|
npcDifficulties.ELITE:
|
||||||
|
self.maxHealth *= 2
|
||||||
|
npcDifficulties.BOSS:
|
||||||
|
self.maxHealth *= 4
|
||||||
|
npcDifficulties.ELITEBOSS:
|
||||||
|
self.maxHealth *= 8
|
||||||
|
npcDifficulties.BBEG:
|
||||||
|
self.maxHealth *= 16
|
||||||
|
# npcTier factor
|
||||||
|
self.maxHealth *= exp(self.npcTier)
|
||||||
|
# fun factor (just additional factor to tweak)
|
||||||
|
self.maxHealth *= 10
|
||||||
|
|
||||||
|
|
||||||
|
func _init() -> void:
|
||||||
|
self.npcDifficulty = npcDifficulties.NORMAL
|
||||||
|
self.npcTier = npcTiers.I
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
# add to enemies
|
||||||
|
add_to_group("enemies")
|
||||||
|
|
||||||
|
# modify max health value based on the various factors
|
||||||
|
_random_mod_health()
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
# if damageTaken > maxHealth:
|
||||||
|
# self.free()?
|
||||||
|
# send signal that I died to be counted, etc.
|
||||||
|
pass
|
5
scripts/zone.gd
Normal file
5
scripts/zone.gd
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
class_name Zone
|
||||||
|
extends Sprite2D
|
||||||
|
|
||||||
|
|
||||||
|
# zone class defines all parameters for creating areas within itself
|
Loading…
Reference in New Issue
Block a user