wywalenie git-plugins godot

This commit is contained in:
sysek 2026-01-05 13:36:23 +01:00
parent d4688ba308
commit 330395779c
16 changed files with 163 additions and 1451 deletions

View file

@ -2,11 +2,10 @@ extends Control
## Grupa przycisków typu checkbox która umożliwia
## wybór tylko jednej opcji
@export var checkbox_group: ButtonGroup
@export var rola_cb: ButtonGroup
@export var metody_cb: ButtonGroup
@onready var solo_cb = get_node("Rola/GridContainer/SoloCB")
@onready var netrunner_cb = get_node("Rola/GridContainer/NetrunnerCB")
@onready var korpo_cb = get_node("Rola/GridContainer/KorpoCB")
@onready var netrunner_cb = get_node("Rola/NetrunnerCB")
@onready var button_roll = $"../../Top/TopMenu/ButtonRoll"
enum Chum { SOLO, NETRUNNER, KORPO }
@ -24,6 +23,8 @@ var netrunner: Dictionary = {
"RUCH": 7,
"BC": 7,
"EMP": 4,
"PW": 0,
"CZL": 0,
},
2: {
"INT": 5,
@ -36,6 +37,8 @@ var netrunner: Dictionary = {
"RUCH": 7,
"BC": 5,
"EMP": 5,
"PW": 0,
"CZL": 0,
},
3: {
"INT": 5,
@ -48,6 +51,8 @@ var netrunner: Dictionary = {
"RUCH": 6,
"BC": 7,
"EMP": 4,
"PW": 0,
"CZL": 0,
},
4: {
"INT": 5,
@ -60,6 +65,8 @@ var netrunner: Dictionary = {
"RUCH": 6,
"BC": 5,
"EMP": 5,
"PW": 0,
"CZL": 0,
},
5: {
"INT": 5,
@ -72,6 +79,8 @@ var netrunner: Dictionary = {
"RUCH": 5,
"BC": 5,
"EMP": 6,
"PW": 0,
"CZL": 0,
},
6: {
"INT": 6,
@ -84,6 +93,8 @@ var netrunner: Dictionary = {
"RUCH": 7,
"BC": 6,
"EMP": 6,
"PW": 0,
"CZL": 0,
},
7: {
"INT": 6,
@ -96,6 +107,8 @@ var netrunner: Dictionary = {
"RUCH": 7,
"BC": 7,
"EMP": 6,
"PW": 0,
"CZL": 0,
},
8: {
"INT": 5,
@ -108,6 +121,8 @@ var netrunner: Dictionary = {
"RUCH": 5,
"BC": 7,
"EMP": 4,
"PW": 0,
"CZL": 0,
},
9: {
"INT": 7,
@ -120,6 +135,8 @@ var netrunner: Dictionary = {
"RUCH": 5,
"BC": 6,
"EMP": 5,
"PW": 0,
"CZL": 0,
},
10: {
"INT": 7,
@ -132,6 +149,8 @@ var netrunner: Dictionary = {
"RUCH": 7,
"BC": 5,
"EMP": 6,
"PW": 0,
"CZL": 0,
},
}
@ -144,9 +163,6 @@ func _ready() -> void:
var stats = get_tree().get_nodes_in_group("stats")
button_roll.disabled = true
netrunner_cb.button_pressed = true
korpo_cb.disabled = true
solo_cb.disabled = true
for stat in stats:
stat.text = "0"
@ -161,7 +177,7 @@ func _draw() -> void:
func _on_button_roll_pressed() -> void:
var roll = Global.rolld(10)
var button_pressed = checkbox_group.get_pressed_button()
var button_pressed = rola_cb.get_pressed_button()
var chum
match button_pressed.name:
@ -179,14 +195,37 @@ func _on_button_roll_pressed() -> void:
func character_template(roll: int, chum: int) -> void:
var stats_group = get_tree().get_nodes_in_group("stats")
var template_number
var _netrunner = netrunner.duplicate()
var template
match chum:
1:
template_number = netrunner.get(roll)
template = _netrunner.get(roll)
_:
print(":(")
template["PW"] = wylicz_pw(template)
template["CZL"] = wylicz_czl(template)
if chum <= 1:
for i in range(stats_group.size()):
stats_group[i].text = str(template_number.values()[i])
stats_group[i].text = str(template.values()[i])
if chum == Chum.NETRUNNER:
print("[%s] PW: %d, CZŁ: %d" % ["Netrunner", template["PW"], template["CZL"]])
func wylicz_pw(template: Dictionary) -> int:
var bc = template["INT"]
var sw = template["SW"]
var pw = 10 + (5 * ceil(lerp(bc, sw, 0.5)))
return pw
func wylicz_czl(template: Dictionary) -> int:
var emp = template["EMP"]
var czl = emp * 10
return czl