Skip to content

Commit

Permalink
Merge pull request #10 from Jeremi360/master
Browse files Browse the repository at this point in the history
better gui
  • Loading branch information
Jeremi360 authored Aug 25, 2020
2 parents aa9f403 + 7b84b66 commit 3519469
Show file tree
Hide file tree
Showing 5 changed files with 857 additions and 1,247 deletions.
2 changes: 1 addition & 1 deletion rakugo-rpg/game/rakugo.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

config/name="Rakugo RPG"
run/main_scene="res://game/rpg/Start/Start.tscn"
rakugo/version="0.1.0"
rakugo/version="0.1.2"
rakugo/game_credits="Jeremi {i}jebedaia360{/i} Biernacki"
rakugo/debug=false
rakugo/scene_links="res://game/scene_links.tres"
Expand Down
14 changes: 9 additions & 5 deletions rakugo-rpg/game/rpg/Characters/RPGCharacter.gd
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ var attack_skills := {
var magic_skills := {
"healing spell": {"cost": 20, "targets": "party"}
}
var special_skills := {
"special attack": {"cost": 20, "targets": "enemies"}

# it should be moved to some global script
var items_stats := {
"mana potion": {"cost": 5, "targets": "party"}
}

var items := {"mana potion": 2}

var def := 0

var hp_bar: ProgressBar
Expand All @@ -46,7 +50,7 @@ func _ready():
stats["exp_points"] = exp_points
stats["hp"] = hp
stats["mana"] = mana
stats["special"] = special
stats["items"] = items
stats["lvl"] = level
stats["unlocked_skills"] = unlocked_skills

Expand Down Expand Up @@ -76,8 +80,8 @@ func use_skill(skill: String, target: RPGCharacter = self) -> void:
target.recive_attack("hp", 20 * s, "heal")
self.recive_attack("mana", m * s, "mana")

if skill == "special attack":
target.recive_attack("hp", -30 * s, "hit")
if skill == "mana potion":
target.recive_attack("mana", 30 * s, "mana")

if skill == "defense":
self.recive_attack("def", 5 * s, "def")
Expand Down
6 changes: 4 additions & 2 deletions rakugo-rpg/game/rpg/Start/CombatDialog.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extends GDScriptDialog

signal start_combat
signal loop
signal end

var prev_dialog : RakugoList

Expand All @@ -23,7 +23,7 @@ func combat_dialog(node_name, dialog_name):
"choices":
{
"yes": "start_combat",
"no" : "loop"
"no" : "end"
}
})

Expand All @@ -32,3 +32,5 @@ func _on_CombatDialog_loop():
jump(prev_dialog.value[0], prev_dialog.value[1], prev_dialog.value[2])


func _on_CombatDialog_end():
Rakugo.end_game()
1 change: 1 addition & 0 deletions rakugo-rpg/game/rpg/Start/Start.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ enemies = [ ExtResource( 5 ), ExtResource( 5 ) ]

[node name="CombatArea" parent="." instance=ExtResource( 4 )]
visible = false
[connection signal="end" from="CombatDialog" to="CombatDialog" method="_on_CombatDialog_end"]
[connection signal="start_combat" from="CombatDialog" to="StartCombat" method="_on_CombatDialog_start_combat"]
Loading

0 comments on commit 3519469

Please sign in to comment.