diff --git a/battle/battle.gd b/battle/battle.gd index 31cef22181926f40e450c80472af6014fcedc309..7e89cd4e346479aac2aa038bb80eef6d5f2ff36f 100644 --- a/battle/battle.gd +++ b/battle/battle.gd @@ -43,7 +43,7 @@ func _ready(): action_menu_.connect("item", self, "push_menu_", [items_]) action_menu_.connect("run", self, "_on_run") action_menu_.connect("pokemon", self, "push_menu_", [pokemon_]) - action_menu_.connect("pokemon", pokemon_.info, "set_text", ["Bring out which POKeMON?"]) + action_menu_.connect("pokemon", pokemon_.info, "set_text", ["Bring out which HATeMON?"]) fight_.connect("activated", self, "_on_attack_activated") fight_.set_process_input(false) @@ -279,7 +279,7 @@ func game_() -> void: var next_enemy_pokemon_idx = enemy.pokemon.find(enemy.active_pokemon) + 1 var next_enemy_pokemon = enemy.pokemon[next_enemy_pokemon_idx] yield(info_box_.set_text("%s is about to use %s." % [enemy.name, next_enemy_pokemon.name]), "done") - yield(info_box_.set_text("Will %s change pokemon?" % [player.name], 0.0), "done") + yield(info_box_.set_text("Will %s change HATeMON?" % [player.name], 0.0), "done") push_menu_(yes_no_menu_) var action:Action = yield(self, "action_choosen") @@ -317,6 +317,10 @@ func game_() -> void: player_graphics_.stats.visible = false enemy_graphics_.trainer.enter($tween) yield($tween.block(), "done") + + var battle_loose = enemy.battle_loose + for line in battle_loose.text.split("\n"): + yield(info_box_.set_text_for_confirm(line), "done") enemy.active_pokemon = null diff --git a/pokemon/beer/beer.tres b/pokemon/beer/beer.tres index d41b2c349f2b1e4b9015ea8cd6e8f01caaaf0bc6..6e65c59203e1ebd69517f380d91253617a50aa10 100644 --- a/pokemon/beer/beer.tres +++ b/pokemon/beer/beer.tres @@ -1,10 +1,7 @@ -[gd_resource type="Resource" load_steps=7 format=2] +[gd_resource type="Resource" load_steps=4 format=2] [ext_resource path="res://pokemon/pokemon_model.gd" type="Script" id=1] -[ext_resource path="res://moves/electric/thunderbolt.tres" type="Resource" id=2] [ext_resource path="res://pokemon/beer/beer_battle_graphic.tscn" type="PackedScene" id=3] -[ext_resource path="res://moves/cut/cut.tres" type="Resource" id=4] -[ext_resource path="res://moves/fire/burn.tres" type="Resource" id=5] [ext_resource path="res://moves/chair/chair.tres" type="Resource" id=6] [resource] @@ -12,11 +9,15 @@ resource_local_to_scene = true script = ExtResource( 1 ) name = "Beer" level = 40 -hp = 20 -max_hp = 20 +hp = 5 +max_hp = 5 xp = 10 +exp_stat = 1 attack = 1 defense = 1 speed = 1 -moves = [ ExtResource( 2 ), ExtResource( 5 ), ExtResource( 4 ), ExtResource( 6 ) ] +wild = false +moves = [ ExtResource( 6 ) ] +moves_to_learn = { +} battle_graphics = ExtResource( 3 ) diff --git a/pokemon/crown/crown.tres b/pokemon/crown/crown.tres index 110e2b7cc82de9a09bc238de91ca211472d1bc24..af367a4840cfadbe3a959c728610ceb18e548fe3 100644 --- a/pokemon/crown/crown.tres +++ b/pokemon/crown/crown.tres @@ -9,8 +9,8 @@ resource_local_to_scene = true script = ExtResource( 1 ) name = "Crown" level = 1 -hp = 15 -max_hp = 20 +hp = 5 +max_hp = 5 xp = 10 exp_stat = 1 attack = 1 diff --git a/pokemon/spikey/spikey.tres b/pokemon/spikey/spikey.tres index a1fde370247d69e3b5b7d3e16e58141e66b7c0f1..4c074ba185ab35f6e1e1d88fdbbd54256aa15549 100644 --- a/pokemon/spikey/spikey.tres +++ b/pokemon/spikey/spikey.tres @@ -9,7 +9,7 @@ resource_local_to_scene = true script = ExtResource( 1 ) name = "Spikey Hat" level = 1 -hp = 5 +hp = 20 max_hp = 20 xp = 10 exp_stat = 1 diff --git a/trainer/dead_man/dead_man.tres b/trainer/dead_man/dead_man.tres index e6260d084a51356d2fd09e9ade08c67c2d480a3d..e9a5ff5e5c68f56d797715dd7270448a8a937334 100644 --- a/trainer/dead_man/dead_man.tres +++ b/trainer/dead_man/dead_man.tres @@ -1,4 +1,4 @@ -[gd_resource type="Resource" load_steps=9 format=2] +[gd_resource type="Resource" load_steps=11 format=2] [ext_resource path="res://trainer/trainer_model.gd" type="Script" id=1] [ext_resource path="res://trainer/dead_man/dead_man_battle_graphic.tscn" type="PackedScene" id=2] @@ -7,6 +7,7 @@ [ext_resource path="res://trainer/dead_man/dead_man_world_encounter.gd" type="Script" id=5] [ext_resource path="res://trainer/text_model.gd" type="Script" id=6] [ext_resource path="res://trainer/dead_man/dead_man_world_loose.gd" type="Script" id=7] +[ext_resource path="res://pokemon/beer/beer.tres" type="Resource" id=8] [sub_resource type="Resource" id=1] script = ExtResource( 6 ) @@ -14,14 +15,19 @@ text = "On my grave it will say: Died saving 100 oprhans from a burning building... And KICKED A DUMB PUGS ASS!" +[sub_resource type="Resource" id=2] +script = ExtResource( 6 ) +text = "God is going to be so upset with me." + [resource] script = ExtResource( 1 ) name = "Annoying Dead Man" -pokemon = [ ExtResource( 3 ) ] +pokemon = [ ExtResource( 3 ), ExtResource( 8 ) ] items = [ ] is_player = false world_encounter = ExtResource( 5 ) battle_begin = SubResource( 1 ) +battle_loose = SubResource( 2 ) world_loose = ExtResource( 7 ) battle_graphic = ExtResource( 2 ) world_graphic = ExtResource( 4 ) diff --git a/trainer/dead_man/dead_man_world_encounter.gd b/trainer/dead_man/dead_man_world_encounter.gd index 6237e31bd583070a6c875800c584c349191468fb..65ddd03d625fd0ec6d80bd8be0ccce9e81b32dc7 100644 --- a/trainer/dead_man/dead_man_world_encounter.gd +++ b/trainer/dead_man/dead_man_world_encounter.gd @@ -2,7 +2,7 @@ extends Game func _ready(): info_box.visible = true - yield(info_box.set_text_for_confirm("You climb on the church's electric organ."), "done") + yield(info_box.set_text_for_confirm("You climb on the piano."), "done") yield(info_box.set_text_for_confirm("You start to play chopsticks badly."), "done") var trainer = get_parent() diff --git a/trainer/red/red.tres b/trainer/red/red.tres index 6d364f351be676f10b73c5291267f527f25c6275..c429ceae1ac62c7a40fc86ac6f87812b12cac041 100644 --- a/trainer/red/red.tres +++ b/trainer/red/red.tres @@ -27,9 +27,9 @@ What? What was that? Amazing! You speak English? Who taught you to talk? Was it my son? This is his funeral sadly. -You didn't know him? But you thought he was a... -... what!!!!!!! -Hey! Stop saying hurtful things!" +You say you didn't know him? But you thought... +... he was a what!!!!!!!? +Hey! Stop saying hurtful things about my son!" [resource] script = ExtResource( 1 ) diff --git a/trainer/rude_man/rude_man.tres b/trainer/rude_man/rude_man.tres index abb2fbedd90d95a04472023fe73aa308b03a1f04..b3c1aa6eb4805757b23546ec5ab6cfbc66d581e7 100644 --- a/trainer/rude_man/rude_man.tres +++ b/trainer/rude_man/rude_man.tres @@ -1,4 +1,4 @@ -[gd_resource type="Resource" load_steps=9 format=2] +[gd_resource type="Resource" load_steps=10 format=2] [ext_resource path="res://trainer/trainer_model.gd" type="Script" id=1] [ext_resource path="res://pokemon/spikey/spikey.tres" type="Resource" id=2] @@ -11,6 +11,10 @@ script = ExtResource( 5 ) text = "Please just leave. You've upset everyone." +[sub_resource type="Resource" id=3] +script = ExtResource( 5 ) +text = "I'm crying." + [sub_resource type="Resource" id=1] script = ExtResource( 5 ) text = "I heard what you said to that poor lady. @@ -25,6 +29,7 @@ items = [ ] is_player = false world_encounter = SubResource( 1 ) battle_begin = SubResource( 2 ) +battle_loose = SubResource( 3 ) world_loose = ExtResource( 6 ) battle_graphic = ExtResource( 3 ) world_graphic = ExtResource( 4 ) diff --git a/trainer/trainer_graphic.gd b/trainer/trainer_graphic.gd index bf822a18b48edb8f565b28469709f97b356e2842..18c4b3b78f4f930d611cb98615e989e97e4d1927 100644 --- a/trainer/trainer_graphic.gd +++ b/trainer/trainer_graphic.gd @@ -5,7 +5,9 @@ onready var front_position_:Vector2 = $front.position onready var back_position_:Vector2 = $back.position func begin(tween:TweenEx) -> void: + $front.position.x = - 40 tween.interpolate_property($front, "position:x", -40, front_position_.x, 1.0) + $back.position.x = 180 tween.interpolate_property($back, "position:x", 180, back_position_.x, 1.0) if $front.visible: tween.step_property($enter, "playing", false, true, 1.0) diff --git a/widgets/pokemon_menu.tscn b/widgets/pokemon_menu.tscn index 2cf2356a963783ee776a4ed8db9a2a02c2498e12..194fc474569cbba2bdbdca6b96e91476102f40ba 100644 --- a/widgets/pokemon_menu.tscn +++ b/widgets/pokemon_menu.tscn @@ -9,7 +9,7 @@ anchor_right = 1.0 anchor_bottom = 1.0 theme = ExtResource( 3 ) -color = Color( 0.588235, 0.588235, 0.588235, 1 ) +color = Color( 0.113725, 0.368627, 0.482353, 1 ) script = ExtResource( 1 ) __meta__ = { "_edit_use_anchors_": false diff --git a/world/interactable.gd b/world/interactable.gd index 3747dfdc424659b61da25db60621c7b1c60e523c..9fcb92fb256c80d7c51d0f42673f4a1cb9b5ca2c 100644 --- a/world/interactable.gd +++ b/world/interactable.gd @@ -2,6 +2,20 @@ extends Area2D signal trigger -func _ready(): - +export(String, MULTILINE) var text +export(bool) var passive +func _on_area_entered(area): + if not passive: + set_deferred("monitoring", false) + emit_signal("trigger") + +func _input(event) -> void: + if not monitoring: + return + + if Input.is_action_just_pressed("ui_accept"): + var player = find_parent("level").find_node("player") + if overlaps_area(player): + set_deferred("monitoring", false) + emit_signal("trigger") diff --git a/world/interactable.tscn b/world/interactable.tscn index 05291191709ff627a3a4333c71a95a72b4949631..436a19abfca286550813dc05c686e2c3e598c7bf 100644 --- a/world/interactable.tscn +++ b/world/interactable.tscn @@ -4,3 +4,5 @@ [node name="interactable" type="Area2D"] script = ExtResource( 1 ) + +[connection signal="area_entered" from="." to="." method="_on_area_entered"] diff --git a/world/world.gd b/world/world.gd index bf2841185e8bd3f5979bbd18b989a60ba00a5178..0e12dcf3c6b18e0a780321f220b7ae4ff9b02fef 100644 --- a/world/world.gd +++ b/world/world.gd @@ -43,3 +43,21 @@ func _on_encounter(trainer) -> void: battle.queue_free() yield(play_script_(trainer, trainer.trainer.world_loose), "done") + +func _on_dead_man_chew_trigger(): + $player.pause_controls = true + info_box_.visible = true + yield(info_box_.set_text_for_confirm("You want to fight the dead man. But he is dead."), "done"); + yield(info_box_.set_text_for_confirm("You settle with chewing his femur."), "done"); + yield(info_box_.set_text_for_confirm("You let your HATeMON try some dead man."), "done"); + yield($tween.wait(0.2), "done") + $success.play() + yield(info_box_.set_text_for_confirm("All HATeMON HP restored!"), "done"); + for p in $player.trainer.pokemon: + p.hp = p.max_hp + + + yield(info_box_.set_text_for_confirm("You notice a piano to your south."), "done"); + yield(info_box_.set_text_for_confirm("You've always wanted to learn."), "done"); + info_box_.visible = false + $player.pause_controls = false diff --git a/world/world.tscn b/world/world.tscn index e18c77d543b4fdddcfc81caf53cca34807094d29..761e5ec6f22e9cc4da46cd7d6bb728ef22b7ecc8 100644 --- a/world/world.tscn +++ b/world/world.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=20 format=2] +[gd_scene load_steps=22 format=2] [ext_resource path="res://widgets/tween_ex.gd" type="Script" id=1] [ext_resource path="res://widgets/info_box.tscn" type="PackedScene" id=2] @@ -14,6 +14,7 @@ [ext_resource path="res://world/player.gd" type="Script" id=12] [ext_resource path="res://trainer/dead_man/dead_man.tres" type="Resource" id=13] [ext_resource path="res://world/npc.tscn" type="PackedScene" id=14] +[ext_resource path="res://world/interactable.tscn" type="PackedScene" id=15] [sub_resource type="SpriteFrames" id=45] animations = [ { @@ -29,7 +30,10 @@ animations = [ { extents = Vector2( 52.5, 26.5 ) [sub_resource type="RayShape2D" id=47] -length = 63.9991 +length = 53.0 + +[sub_resource type="CircleShape2D" id=49] +radius = 16.0 [sub_resource type="CircleShape2D" id=48] radius = 16.0 @@ -121,6 +125,33 @@ position = Vector2( 105, 56 ) position = Vector2( 2.5, -13.5 ) shape = SubResource( 46 ) +[node name="CollisionShape2D3" type="CollisionShape2D" parent="chairs"] +position = Vector2( 108, 31 ) +shape = SubResource( 46 ) + +[node name="CollisionShape2D4" type="CollisionShape2D" parent="chairs"] +position = Vector2( -135, -3 ) +rotation = 1.5708 +shape = SubResource( 46 ) + +[node name="CollisionShape2D5" type="CollisionShape2D" parent="chairs"] +position = Vector2( -134, 102 ) +rotation = 1.5708 +shape = SubResource( 46 ) + +[node name="CollisionShape2D8" type="CollisionShape2D" parent="chairs"] +position = Vector2( -134, 102 ) +rotation = 1.5708 +shape = SubResource( 46 ) + +[node name="CollisionShape2D6" type="CollisionShape2D" parent="chairs"] +position = Vector2( -52, 114 ) +shape = SubResource( 46 ) + +[node name="CollisionShape2D7" type="CollisionShape2D" parent="chairs"] +position = Vector2( -94, -67 ) +shape = SubResource( 46 ) + [node name="CollisionShape2D2" type="CollisionShape2D" parent="chairs"] position = Vector2( 2.5, 61.5 ) shape = SubResource( 46 ) @@ -133,6 +164,23 @@ trainer = ExtResource( 9 ) rotation = -1.5708 shape = SubResource( 47 ) +[node name="rude_man" parent="." instance=ExtResource( 14 )] +position = Vector2( 40, 35 ) +trainer = ExtResource( 8 ) + +[node name="los" type="CollisionShape2D" parent="rude_man"] +shape = SubResource( 47 ) + +[node name="dead_man_chew" parent="." instance=ExtResource( 15 )] +position = Vector2( 15, 75 ) +text = "You want to fight the dead man. But he is dead. +You settle with chewing his femur. +You notice an organ in the corner of the church.q" + +[node name="trigger" type="CollisionShape2D" parent="dead_man_chew"] +position = Vector2( 0, 7 ) +shape = SubResource( 49 ) + [node name="dead_man" parent="." instance=ExtResource( 14 )] position = Vector2( 11, 82 ) trainer = ExtResource( 13 ) @@ -142,14 +190,9 @@ passive = true position = Vector2( 2, 54 ) shape = SubResource( 48 ) -[node name="rude_man" parent="." instance=ExtResource( 14 )] -position = Vector2( 40, 35 ) -trainer = ExtResource( 8 ) - -[node name="los2" type="CollisionShape2D" parent="rude_man"] -shape = SubResource( 47 ) - [node name="info_box" parent="." instance=ExtResource( 2 )] visible = false [node name="transition" parent="." instance_placeholder="res://widgets/transition.tscn"] + +[connection signal="trigger" from="dead_man_chew" to="." method="_on_dead_man_chew_trigger"]