Added some changes to the GSAL and worked on adding some more functions from the KANBAN

This commit is contained in:
PersonGuyGit 2024-02-04 12:58:12 -07:00
parent 98e413d4e7
commit 52985dbba4
2 changed files with 21 additions and 15 deletions

View File

@ -78,7 +78,6 @@ var Weapons = 0.0
# TODO: Add Modifers to the characters sheet: Then these modfiers can be added to skill checks # TODO: Add Modifers to the characters sheet: Then these modfiers can be added to skill checks
# Section 1 End # Section 1 End
#Section 2 (Calculate) #Section 2 (Calculate)
@ -99,6 +98,7 @@ func nonOpposedSkillCheck(requiredStat, numberToMatch, statModifier = 0.0):
# Think of the checks in Dialog in Fallout 3 and New Vegas # Think of the checks in Dialog in Fallout 3 and New Vegas
# The default modifier is Zero, unless another stat modifier value is provided # The default modifier is Zero, unless another stat modifier value is provided
# Stat modifier should come from the character sheet.
if statModifier > 0.0: if statModifier > 0.0:
var moddedStat = requiredStat + statModifier var moddedStat = requiredStat + statModifier
if moddedStat >= numberToMatch: if moddedStat >= numberToMatch:
@ -115,25 +115,35 @@ func nonOpposedSkillCheck(requiredStat, numberToMatch, statModifier = 0.0):
# Refactor DieRoller from the main game, to be a modular function # Refactor DieRoller from the main game, to be a modular function
# Pull Die Sizes from the variable "definedDiceTypes" # Pull Die Sizes from the variable "definedDiceTypes"
func _dieRoll(dieMin, dieMax): func _dieRoll(dieMin, dieMax):
return rand_range(dieMin, dieMax) return randi() % dieMax + dieMin
# Create rough formulas to plug into this function, per game system module # Create rough formulas to plug into this function, per game system module
# Otherwise follow the default formula provided in the function # Otherwise follow the default formula provided in the function
func _calculateInitiative(inputCharacterArray): func _calculateInitiative(inputCharacterArray):
pass var outputCharacterArray = []
for person in inputCharacterArray:
# Return a number between 1 / 20 and add it to the array
# Change to a D6 for BFRPG rules.
outputCharacterArray.push_back([person, _dieRoll(1, 20)])
# Sort by highest to lowest, according to BFRPG Rules.
outputCharacterArray.sort()
return outputCharacterArray
# Draft Function # Draft Function
# Need to work on calculate initiatve first. # Need to work on calculate initiatve first.
# I might need to have to add a way to resolve Ties between both arrays. # I might need to have to add a way to resolve Ties between both arrays.
#func _defenderAndOpponentResults(playerArray, enemyArray): func _defenderAndOpponentResults(playerArray, enemyArray):
# var DefenderResults = [] var DefenderResults = []
# var OpponentResults = [] var OpponentResults = []
#
# DefenderResults.push_back(_calculateInitiative(playerArray)) DefenderResults.push_back(_calculateInitiative(playerArray))
# OpponentResults.push_back(_calculateInitiative(playerArray)) OpponentResults.push_back(_calculateInitiative(enemyArray))
#
# return[[DefenderResults][OpponentResults]] return[[DefenderResults][OpponentResults]]
# Section 2 End # Section 2 End
@ -152,10 +162,6 @@ func _calculateInitiative(inputCharacterArray):
# #
#var Opponent_Results_Calclation: int #var Opponent_Results_Calclation: int
#func _Defender_VS_Opponent_Results(int): Matrix
#Matrix is not a built in datatype in Godot. How I am imagining us doing this is with a 2D or 3D array.
#Example Structure [[DefenderResults], [OpponentResults]]
#func _Outcome_Options(Matrix): List #func _Outcome_Options(Matrix): List