Items integrados y mejoras #22
No files matched your search
@@ -1944,3 +1944,18 @@ LATER
|
|||||||
```
|
```
|
||||||
|
|
||||||
El objetivo principal es siempre tener una versión pequeña pero completamente jugable antes de ampliar el alcance.
|
El objetivo principal es siempre tener una versión pequeña pero completamente jugable antes de ampliar el alcance.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Estado actualizado: objetos y recompensas (octubre de 2026)
|
||||||
|
|
||||||
|
- **Implementado:** 17 objetos configurables (`pickups/data/`) con SVG originales de 32×32 (16×16 visibles), textos breves y efectos.
|
||||||
|
- **Implementado:** curación, velocidad, daño, carga del especial, bloqueo de un golpe, reducción de daño, altura de salto y daño aéreo.
|
||||||
|
- **Implementado:** tabla de drops ponderados de Walker; 50% de probabilidad de un objeto por muerte.
|
||||||
|
- **Implementado:** el objeto del primer nivel usa el mismo sistema que los demás, sin alterar `CharacterData`.
|
||||||
|
- **Pendiente:** indicadores persistentes de mejoras activas, coleccionables secretos, pruebas visuales en el editor y equilibrado.
|
||||||
|
|
||||||
|
Catálogo, pesos, estados e instrucciones: **[docs/items.md](docs/items.md)**.
|
||||||
|
|
||||||
|
> Importante: el proyecto contiene un prototipo jugable y arte provisional; la implementación no sustituye una prueba real en Godot ni garantiza una clasificación por edades concreta.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g fill="#f37e6d" stroke="#252132" stroke-width="1.6" stroke-linejoin="round"><rect x="3" y="5" width="26" height="23" rx="2"/><rect x="6" y="12" width="20" height="13" rx="2" fill="#3b3443"/><circle cx="16" cy="18" r="6" fill="none" stroke="#bdb7d2" stroke-width="2"/><circle cx="10" cy="9" r="1.5" fill="#ffffb8"/><circle cx="16" cy="9" r="1.5" fill="#ffffb8"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 457 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g fill="#eac58c" stroke="#252132" stroke-width="1.6" stroke-linejoin="round"><path d="M7 26 24 5l3 3-17 20z"/><circle cx="25" cy="6" r="4" fill="#fff4d3"/><path d="m12 20 3 3" stroke="#fff" stroke-width="2"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 303 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g fill="#ffcd5b" stroke="#252132" stroke-width="1.6" stroke-linejoin="round"><path d="M7 10h16l-2 15H9z"/><path d="M23 12h4v8h-5" fill="none" stroke="#252132" stroke-width="3"/><path d="M8 10q2-8 5-3 4-7 7 0 5-4 6 3" fill="#fff4c7"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 328 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g fill="#f0ae55" stroke="#252132" stroke-width="1.6" stroke-linejoin="round"><path d="M4 13 16 5l12 8-3 11H7z"/><path d="M6 16h20l-2 4H8" fill="#65bf75"/><path d="M8 22h16" stroke="#fff3c7" stroke-width="3"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 303 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g fill="#b99afa" stroke="#252132" stroke-width="1.6" stroke-linejoin="round"><path d="M8 4h12v12l7 5v6H4v-7l4-4z"/><path d="M9 10h10M8 15h11" stroke="#f7e7ff" stroke-width="2"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 272 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g fill="#ec9fcd" stroke="#252132" stroke-width="1.6" stroke-linejoin="round"><rect x="3" y="7" width="26" height="20" rx="2"/><rect x="6" y="10" width="20" height="10" fill="#fff1dd"/><circle cx="11" cy="15" r="3" fill="#343048"/><circle cx="21" cy="15" r="3" fill="#343048"/><path d="M8 24h16" stroke="#343048" stroke-width="2"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 425 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g fill="#a1c1cc" stroke="#252132" stroke-width="1.6" stroke-linejoin="round"><circle cx="16" cy="16" r="12"/><circle cx="16" cy="16" r="6" fill="#343048"/><circle cx="16" cy="16" r="2" fill="#c8cfde"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 296 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g fill="#9b6243" stroke="#252132" stroke-width="1.6" stroke-linejoin="round"><path d="M7 10h17l-2 16H9z"/><path d="M24 12h3v10h-4" stroke="#252132" stroke-width="3" fill="none"/><path d="M12 4v4m7-4v4" stroke="#fff3d4" stroke-width="2"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 332 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g fill="#e5e6fc" stroke="#252132" stroke-width="1.6" stroke-linejoin="round"><circle cx="10" cy="10" r="6" fill="none" stroke="#f8faff" stroke-width="3"/><circle cx="22" cy="22" r="6" fill="none" stroke="#f8faff" stroke-width="3"/><path d="M14 7q17 0 7 18M6 15q2 11 18 7" stroke="#343048" stroke-width="2" fill="none"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 414 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g fill="#f55b78" stroke="#252132" stroke-width="1.6" stroke-linejoin="round"><rect x="9" y="5" width="14" height="23" rx="3"/><path d="M10 8h12M10 25h12" stroke="#fff" stroke-width="2"/><path d="m18 11-6 8h5l-3 6 8-10h-5z" fill="#fff9ac"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 334 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g fill="#82d8f3" stroke="#252132" stroke-width="1.6" stroke-linejoin="round"><path d="M5 26h22M5 6h22M8 24l16-4-16-4 16-4L8 8" stroke="#343048" stroke-width="3" fill="none"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 269 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g fill="#76bddc" stroke="#252132" stroke-width="1.6" stroke-linejoin="round"><rect x="6" y="4" width="20" height="24" rx="3"/><circle cx="16" cy="10" r="3" fill="#f9e68d"/><rect x="10" y="17" width="12" height="7" rx="1" fill="#343048"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 332 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g fill="#f9a047" stroke="#252132" stroke-width="1.6" stroke-linejoin="round"><path d="M4 5 27 11 12 28z"/><path d="m4 5 23 6" stroke="#d17d39" stroke-width="5"/><circle cx="15" cy="16" r="3" fill="#c54b5a"/><circle cx="19" cy="12" r="2" fill="#c54b5a"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 348 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g fill="#dc78f8" stroke="#252132" stroke-width="1.6" stroke-linejoin="round"><path d="M16 4Q3 3 5 14q2 9 11 15 12-10 12-17T16 4z"/><path d="m16 9-4 8h5l-2 7 7-11h-5z" fill="#fff"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 275 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g fill="#f1e7a3" stroke="#252132" stroke-width="1.6" stroke-linejoin="round"><path d="M7 3h16l4 5v21H7z"/><path d="M23 3v6h4M11 14h12M11 19h12M11 24h9" stroke="#584c46" stroke-width="2" fill="none"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 294 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g fill="#c2eb7e" stroke="#252132" stroke-width="1.6" stroke-linejoin="round"><path d="M8 5h6v20H8zM20 8h6v17h-6z"/><path d="M7 6h8M19 9h8" stroke="#fff" stroke-width="3"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 266 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g fill="#83d0c5" stroke="#252132" stroke-width="1.6" stroke-linejoin="round"><rect x="4" y="10" width="24" height="17" rx="2"/><rect x="3" y="6" width="26" height="6" rx="2" fill="#defaff"/><path d="M10 18h12" stroke="#fff" stroke-width="3"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 337 B |
@@ -0,0 +1,58 @@
|
|||||||
|
# Objetos de Mortal Maze
|
||||||
|
|
||||||
|
Estado: **implementado** = recurso, icono SVG y efecto integrados en el jugador. Los valores son provisionales hasta playtesting.
|
||||||
|
|
||||||
|
Los SVG son de 32 x 32 px, y la escena `pickup.tscn` escala el Sprite2D a 0.5: **16 x 16 px visibles**, igual que el placeholder original.
|
||||||
|
|
||||||
|
| Objeto (recurso) | Descripcion | Efecto | Estado |
|
||||||
|
|---|---|---|---|
|
||||||
|
| **Espuma del Pogo** (`beer.tres`) | Espuma garantizada. El contenido, no tanto. | +30 PV | **Implementado** |
|
||||||
|
| **Tostado del Averno** (`coffee.tres`) | 240 BPM por las venas. | +25% velocidad, 12 s | **Implementado** |
|
||||||
|
| **Bocata del Roadie** (`bocata_roadie.tres`) | Lleva tres giras en la furgoneta. | +20 PV | **Implementado** |
|
||||||
|
| **Pizza Post-Bolo** (`pizza_post_bolo.tres`) | La encontraron detras del amplificador. | +45 PV | **Implementado** |
|
||||||
|
| **Tupper del Bateria** (`tupper_bateria.tres`) | Ni su madre recuerda que le puso. | +70 PV | **Implementado** |
|
||||||
|
| **Lata de Feedback** (`lata_feedback.tres`) | Hace mas ruido al abrirse que el guitarrista. | +15% velocidad, 20 s | **Implementado** |
|
||||||
|
| **Botas del Doble Bombo** (`botas_doble_bombo.tres`) | El bateria marca el ritmo de la carrera. | +35% velocidad, 8 s | **Implementado** |
|
||||||
|
| **Pua del Apocalipsis** (`pua_apocalipsis.tres`) | Tres acordes. Cero supervivientes. | +30% daño básico/aéreo, 12 s | **Implementado** |
|
||||||
|
| **Pedal de Distorsion** (`pedal_distorsion.tres`) | El tecnico de sonido ha dimitido. | +50% daño básico/aéreo, 7 s | **Implementado** |
|
||||||
|
| **Cuerda de Titanio** (`cuerda_titanio.tres`) | No desafina. Tampoco perdona. | +20% daño básico/aéreo, 20 s | **Implementado** |
|
||||||
|
| **Casete de la Demo Perdida** (`casete_demo.tres`) | Grabado en un garaje. Se nota. | +25 especial | **Implementado** |
|
||||||
|
| **Setlist del Fin del Mundo** (`setlist_fin.tres`) | Si no queda escenario, el orden da igual. | +50 especial | **Implementado** |
|
||||||
|
| **Amplificador al 11** (`amplificador_11.tres`) | El 10 era para cobardes. | +100 especial | **Implementado** |
|
||||||
|
| **Cinta Americana Infinita** (`cinta_americana.tres`) | Arregla todo, menos la afinacion. | Absorbe el próximo golpe | **Implementado** |
|
||||||
|
| **Tapones del Tecnico** (`tapones_tecnico.tres`) | Por una vez, el tecnico tenia razon. | -25% daño recibido, 12 s | **Implementado** |
|
||||||
|
| **Muelles del Stage Diving** (`muelles_stage.tres`) | El aterrizaje no esta incluido. | +20% impulso de salto, 12 s | **Implementado** |
|
||||||
|
| **Baqueta Sismica** (`baqueta_sismica.tres`) | Una prueba de sonido y desaparecio el suelo. | +50% daño aéreo adicional, 10 s | **Implementado** |
|
||||||
|
|
||||||
|
## Distribución y reglas
|
||||||
|
|
||||||
|
- Walker: 50% de probabilidad de soltar 1 objeto al morir; tabla ponderada en `enemies/walker/walker_drop.tres`.
|
||||||
|
- `Muelles del Stage Diving` y `Baqueta Sismica`: recursos implementados, disponibles para colocar manualmente en niveles; aún no incluidos en la tabla de Walker.
|
||||||
|
- Las curaciones no se consumen si ya tienes la vida completa; el especial tampoco si está lleno.
|
||||||
|
- Las mejoras de igual tipo renuevan duración y conservan la mayor potencia (no se multiplican entre sí). Mejoras de tipos diferentes conviven.
|
||||||
|
- El escudo bloquea un golpe y aplica la invulnerabilidad habitual del jugador.
|
||||||
|
- Los sprites son iconos originales vectoriales, no se reutilizan imágenes de terceros.
|
||||||
|
|
||||||
|
## Pendiente (no implementado)
|
||||||
|
|
||||||
|
| Coleccionable | Descripción | Estado |
|
||||||
|
|---|---|---|
|
||||||
|
| La Pua Perdida | Lleva desaparecida desde el primer concierto. Estaba debajo del sofá. | Pendiente: sistema de coleccionables |
|
||||||
|
| La Primera Maqueta | La grabaron en 2008. Todavía están intentando mezclarla. | Pendiente: sistema de coleccionables |
|
||||||
|
| El Calcetin del Bajista | Nadie sabe de quien es. Todos saben que hay que alejarse. | Pendiente: sistema de coleccionables |
|
||||||
|
| La Factura del Local | Impagada desde tiempos inmemoriales. | Pendiente: sistema de coleccionables |
|
||||||
|
|
||||||
|
## Añadir un objeto
|
||||||
|
|
||||||
|
1. Duplica un `.tres` de `pickups/data/`; cambia `id`, `display_name`, `description`, `icon`, `effect_type`, `value` y `duration`.
|
||||||
|
2. Coloca un SVG 32×32 en `assets/pickups/`; Godot lo importa como Texture2D.
|
||||||
|
3. Si debe caer de enemigos, añade una entrada `PickupDrop` con su peso en `enemies/walker/walker_drop.tres`.
|
||||||
|
4. Si requiere una mecánica nueva, añádela expresamente en `Player.collect_pickup()` y documenta aquí su efecto.
|
||||||
|
5. Prueba a recogerlo con vida/especial llenos, dos veces seguidas y justo cuando expira.
|
||||||
|
|
||||||
|
## Comprobaciones pendientes
|
||||||
|
|
||||||
|
- Probar visualmente las importaciones SVG y cada efecto en Godot 4.7.
|
||||||
|
- Equilibrar tiempos y probabilidades tras jugar varios niveles.
|
||||||
|
- Añadir indicadores persistentes de buffs en el HUD (ahora se muestra texto flotante al recoger).
|
||||||
|
- Revisar la clasificación por edades con el cuestionario IARC/Google Play; nombres ficticios no garantizan ninguna clasificación.
|
||||||
@@ -1,23 +1,101 @@
|
|||||||
[gd_resource type="Resource" script_class="PickupDropTable" load_steps=7 format=3]
|
[gd_resource type="Resource" script_class="PickupDropTable" load_steps=33 format=3]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://pickups/pickup_drop.gd" id="1_drop"]
|
[ext_resource type="Script" path="res://pickups/pickup_drop.gd" id="1_drop"]
|
||||||
[ext_resource type="Script" path="res://pickups/pickup_drop_table.gd" id="2_table"]
|
[ext_resource type="Script" path="res://pickups/pickup_drop_table.gd" id="2_table"]
|
||||||
[ext_resource type="Resource" path="res://pickups/data/beer.tres" id="3_beer"]
|
[ext_resource type="Resource" path="res://pickups/data/beer.tres" id="item_0"]
|
||||||
[ext_resource type="Resource" path="res://pickups/data/coffee.tres" id="4_coffee"]
|
[ext_resource type="Resource" path="res://pickups/data/coffee.tres" id="item_1"]
|
||||||
|
[ext_resource type="Resource" path="res://pickups/data/bocata_roadie.tres" id="item_2"]
|
||||||
|
[ext_resource type="Resource" path="res://pickups/data/pizza_post_bolo.tres" id="item_3"]
|
||||||
|
[ext_resource type="Resource" path="res://pickups/data/tupper_bateria.tres" id="item_4"]
|
||||||
|
[ext_resource type="Resource" path="res://pickups/data/lata_feedback.tres" id="item_5"]
|
||||||
|
[ext_resource type="Resource" path="res://pickups/data/botas_doble_bombo.tres" id="item_6"]
|
||||||
|
[ext_resource type="Resource" path="res://pickups/data/pua_apocalipsis.tres" id="item_7"]
|
||||||
|
[ext_resource type="Resource" path="res://pickups/data/pedal_distorsion.tres" id="item_8"]
|
||||||
|
[ext_resource type="Resource" path="res://pickups/data/cuerda_titanio.tres" id="item_9"]
|
||||||
|
[ext_resource type="Resource" path="res://pickups/data/casete_demo.tres" id="item_10"]
|
||||||
|
[ext_resource type="Resource" path="res://pickups/data/setlist_fin.tres" id="item_11"]
|
||||||
|
[ext_resource type="Resource" path="res://pickups/data/amplificador_11.tres" id="item_12"]
|
||||||
|
[ext_resource type="Resource" path="res://pickups/data/cinta_americana.tres" id="item_13"]
|
||||||
|
[ext_resource type="Resource" path="res://pickups/data/tapones_tecnico.tres" id="item_14"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_beer"]
|
[sub_resource type="Resource" id="drop_0"]
|
||||||
script = ExtResource("1_drop")
|
script = ExtResource("1_drop")
|
||||||
pickup = ExtResource("3_beer")
|
pickup = ExtResource("item_0")
|
||||||
weight = 0.5
|
weight = 15.0
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_coffee"]
|
[sub_resource type="Resource" id="drop_1"]
|
||||||
script = ExtResource("1_drop")
|
script = ExtResource("1_drop")
|
||||||
pickup = ExtResource("4_coffee")
|
pickup = ExtResource("item_1")
|
||||||
weight = 0.5
|
weight = 10.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="drop_2"]
|
||||||
|
script = ExtResource("1_drop")
|
||||||
|
pickup = ExtResource("item_2")
|
||||||
|
weight = 14.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="drop_3"]
|
||||||
|
script = ExtResource("1_drop")
|
||||||
|
pickup = ExtResource("item_3")
|
||||||
|
weight = 9.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="drop_4"]
|
||||||
|
script = ExtResource("1_drop")
|
||||||
|
pickup = ExtResource("item_4")
|
||||||
|
weight = 2.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="drop_5"]
|
||||||
|
script = ExtResource("1_drop")
|
||||||
|
pickup = ExtResource("item_5")
|
||||||
|
weight = 10.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="drop_6"]
|
||||||
|
script = ExtResource("1_drop")
|
||||||
|
pickup = ExtResource("item_6")
|
||||||
|
weight = 5.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="drop_7"]
|
||||||
|
script = ExtResource("1_drop")
|
||||||
|
pickup = ExtResource("item_7")
|
||||||
|
weight = 8.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="drop_8"]
|
||||||
|
script = ExtResource("1_drop")
|
||||||
|
pickup = ExtResource("item_8")
|
||||||
|
weight = 3.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="drop_9"]
|
||||||
|
script = ExtResource("1_drop")
|
||||||
|
pickup = ExtResource("item_9")
|
||||||
|
weight = 5.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="drop_10"]
|
||||||
|
script = ExtResource("1_drop")
|
||||||
|
pickup = ExtResource("item_10")
|
||||||
|
weight = 8.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="drop_11"]
|
||||||
|
script = ExtResource("1_drop")
|
||||||
|
pickup = ExtResource("item_11")
|
||||||
|
weight = 4.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="drop_12"]
|
||||||
|
script = ExtResource("1_drop")
|
||||||
|
pickup = ExtResource("item_12")
|
||||||
|
weight = 1.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="drop_13"]
|
||||||
|
script = ExtResource("1_drop")
|
||||||
|
pickup = ExtResource("item_13")
|
||||||
|
weight = 3.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="drop_14"]
|
||||||
|
script = ExtResource("1_drop")
|
||||||
|
pickup = ExtResource("item_14")
|
||||||
|
weight = 3.0
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("2_table")
|
script = ExtResource("2_table")
|
||||||
drops = Array[ExtResource("1_drop")]([SubResource("Resource_beer"), SubResource("Resource_coffee")])
|
drops = Array[ExtResource("1_drop")]([SubResource("drop_0"), SubResource("drop_1"), SubResource("drop_2"), SubResource("drop_3"), SubResource("drop_4"), SubResource("drop_5"), SubResource("drop_6"), SubResource("drop_7"), SubResource("drop_8"), SubResource("drop_9"), SubResource("drop_10"), SubResource("drop_11"), SubResource("drop_12"), SubResource("drop_13"), SubResource("drop_14")])
|
||||||
drop_chance = 0.5
|
drop_chance = 0.5
|
||||||
min_drops = 1
|
min_drops = 1
|
||||||
max_drops = 1
|
max_drops = 1
|
||||||
@@ -16,10 +16,6 @@ var platform_colors: Dictionary = {
|
|||||||
|
|
||||||
var victory_timer: float = 0.0
|
var victory_timer: float = 0.0
|
||||||
var showing_victory: bool = false
|
var showing_victory: bool = false
|
||||||
var powerup_message_timer: float = 0.0
|
|
||||||
|
|
||||||
# Daño original del jugador, para restaurarlo tras el power-up.
|
|
||||||
var _original_basic_damage: int = 1
|
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
@@ -30,11 +26,6 @@ func _ready() -> void:
|
|||||||
if finish:
|
if finish:
|
||||||
finish.body_entered.connect(_on_finish_entered)
|
finish.body_entered.connect(_on_finish_entered)
|
||||||
|
|
||||||
# Power-up recogible.
|
|
||||||
var powerup: Area2D = $PowerUp
|
|
||||||
if powerup:
|
|
||||||
powerup.body_entered.connect(_on_powerup_entered)
|
|
||||||
|
|
||||||
# Zona de muerte (caer fuera del nivel).
|
# Zona de muerte (caer fuera del nivel).
|
||||||
var death: Area2D = $DeathZone
|
var death: Area2D = $DeathZone
|
||||||
if death:
|
if death:
|
||||||
@@ -44,9 +35,6 @@ func _ready() -> void:
|
|||||||
if player.has_signal("died"):
|
if player.has_signal("died"):
|
||||||
player.died.connect(_on_player_died)
|
player.died.connect(_on_player_died)
|
||||||
|
|
||||||
# Guardamos el daño base para restaurarlo después del power-up.
|
|
||||||
if player.character_data:
|
|
||||||
_original_basic_damage = player.character_data.basic_attack_damage
|
|
||||||
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
@@ -55,11 +43,6 @@ func _process(delta: float) -> void:
|
|||||||
if victory_timer >= 3.0:
|
if victory_timer >= 3.0:
|
||||||
get_tree().reload_current_scene()
|
get_tree().reload_current_scene()
|
||||||
|
|
||||||
if powerup_message_timer > 0.0:
|
|
||||||
powerup_message_timer = max(powerup_message_timer - delta, 0.0)
|
|
||||||
if powerup_message_timer <= 0.0:
|
|
||||||
message_label.visible = false
|
|
||||||
|
|
||||||
|
|
||||||
func _on_finish_entered(body: Node2D) -> void:
|
func _on_finish_entered(body: Node2D) -> void:
|
||||||
if body != player:
|
if body != player:
|
||||||
@@ -69,31 +52,6 @@ func _on_finish_entered(body: Node2D) -> void:
|
|||||||
message_label.visible = true
|
message_label.visible = true
|
||||||
|
|
||||||
|
|
||||||
func _on_powerup_entered(body: Node2D) -> void:
|
|
||||||
if body != player:
|
|
||||||
return
|
|
||||||
|
|
||||||
# Power-up: daño aumentado temporalmente.
|
|
||||||
if player.character_data:
|
|
||||||
if _original_basic_damage == 1:
|
|
||||||
_original_basic_damage = player.character_data.basic_attack_damage
|
|
||||||
player.character_data.basic_attack_damage = 5
|
|
||||||
|
|
||||||
# Destruimos el power-up para que no se pueda recoger dos veces.
|
|
||||||
$PowerUp.queue_free()
|
|
||||||
|
|
||||||
message_label.text = "¡POWER-UP! Daño x5 durante 10s"
|
|
||||||
message_label.visible = true
|
|
||||||
powerup_message_timer = 10.0
|
|
||||||
|
|
||||||
# Restaurar daño tras 10 segundos.
|
|
||||||
await get_tree().create_timer(10.0).timeout
|
|
||||||
if player.character_data:
|
|
||||||
player.character_data.basic_attack_damage = _original_basic_damage
|
|
||||||
if powerup_message_timer <= 0.0:
|
|
||||||
message_label.visible = false
|
|
||||||
|
|
||||||
|
|
||||||
func _on_death_entered(body: Node2D) -> void:
|
func _on_death_entered(body: Node2D) -> void:
|
||||||
if body != player:
|
if body != player:
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
[gd_scene load_steps=15 format=3]
|
[gd_scene load_steps=16 format=3]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" path="res://player/player.tscn" id="1_player"]
|
[ext_resource type="PackedScene" path="res://player/player.tscn" id="1_player"]
|
||||||
[ext_resource type="PackedScene" path="res://enemies/walker/walker.tscn" id="2_walker"]
|
[ext_resource type="PackedScene" path="res://enemies/walker/walker.tscn" id="2_walker"]
|
||||||
[ext_resource type="PackedScene" path="res://ui/mobile_controls/mobile_controls.tscn" id="4_mobile_controls"]
|
[ext_resource type="PackedScene" path="res://ui/mobile_controls/mobile_controls.tscn" id="4_mobile_controls"]
|
||||||
[ext_resource type="Script" path="res://levels/level_01.gd" id="3_level"]
|
[ext_resource type="Script" path="res://levels/level_01.gd" id="3_level"]
|
||||||
|
[ext_resource type="PackedScene" path="res://pickups/pickup.tscn" id="5_pickup"]
|
||||||
|
[ext_resource type="Resource" path="res://pickups/data/pua_apocalipsis.tres" id="6_pua"]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="FloorShape"]
|
[sub_resource type="RectangleShape2D" id="FloorShape"]
|
||||||
size = Vector2(1400, 40)
|
size = Vector2(1400, 40)
|
||||||
@@ -14,9 +16,6 @@ size = Vector2(220, 20)
|
|||||||
[sub_resource type="RectangleShape2D" id="FinishShape"]
|
[sub_resource type="RectangleShape2D" id="FinishShape"]
|
||||||
size = Vector2(60, 40)
|
size = Vector2(60, 40)
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="PowerUpShape"]
|
|
||||||
radius = 12
|
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="DeathShape"]
|
[sub_resource type="RectangleShape2D" id="DeathShape"]
|
||||||
size = Vector2(3000, 200)
|
size = Vector2(3000, 200)
|
||||||
|
|
||||||
@@ -58,11 +57,9 @@ position = Vector2(1280, 600)
|
|||||||
[node name="FinishShape" type="CollisionShape2D" parent="FinishZone"]
|
[node name="FinishShape" type="CollisionShape2D" parent="FinishZone"]
|
||||||
shape = SubResource("FinishShape")
|
shape = SubResource("FinishShape")
|
||||||
|
|
||||||
[node name="PowerUp" type="Area2D" parent="."]
|
[node name="PowerUp" parent="." instance=ExtResource("5_pickup")]
|
||||||
position = Vector2(300, 440)
|
position = Vector2(300, 440)
|
||||||
|
pickup_data = ExtResource("6_pua")
|
||||||
[node name="PowerUpShape" type="CollisionShape2D" parent="PowerUp"]
|
|
||||||
shape = SubResource("PowerUpShape")
|
|
||||||
|
|
||||||
[node name="DeathZone" type="Area2D" parent="."]
|
[node name="DeathZone" type="Area2D" parent="."]
|
||||||
position = Vector2(0, 680)
|
position = Vector2(0, 680)
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[gd_resource type="Resource" script_class="PickupData" load_steps=3 format=3]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://pickups/pickup_data.gd" id="1_data"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/pickups/amplificador_11.svg" id="2_icon"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_data")
|
||||||
|
id = &"amplificador_11"
|
||||||
|
display_name = "Amplificador al 11"
|
||||||
|
description = "El 10 era para cobardes."
|
||||||
|
icon = ExtResource("2_icon")
|
||||||
|
color = Color("#f37e6d")
|
||||||
|
effect_type = "special_charge"
|
||||||
|
value = 100.0
|
||||||
|
duration = 0.0
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[gd_resource type="Resource" script_class="PickupData" load_steps=3 format=3]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://pickups/pickup_data.gd" id="1_data"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/pickups/baqueta_sismica.svg" id="2_icon"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_data")
|
||||||
|
id = &"baqueta_sismica"
|
||||||
|
display_name = "Baqueta Sismica"
|
||||||
|
description = "Una prueba de sonido y desaparecio el suelo."
|
||||||
|
icon = ExtResource("2_icon")
|
||||||
|
color = Color("#eac58c")
|
||||||
|
effect_type = "air_damage_boost"
|
||||||
|
value = 0.5
|
||||||
|
duration = 10.0
|
||||||
@@ -1,12 +1,15 @@
|
|||||||
[gd_resource type="Resource" script_class="PickupData" load_steps=2 format=3]
|
[gd_resource type="Resource" script_class="PickupData" load_steps=3 format=3]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://pickups/pickup_data.gd" id="1_data"]
|
[ext_resource type="Script" path="res://pickups/pickup_data.gd" id="1_data"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/pickups/beer.svg" id="2_icon"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_data")
|
script = ExtResource("1_data")
|
||||||
id = &"beer"
|
id = &"beer"
|
||||||
display_name = "Cerveza"
|
display_name = "Espuma del Pogo"
|
||||||
color = Color(1, 0.76, 0.18, 1)
|
description = "Espuma garantizada. El contenido, no tanto."
|
||||||
|
icon = ExtResource("2_icon")
|
||||||
|
color = Color("#ffcd5b")
|
||||||
effect_type = "heal"
|
effect_type = "heal"
|
||||||
value = 30.0
|
value = 30.0
|
||||||
duration = 0.0
|
duration = 0.0
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[gd_resource type="Resource" script_class="PickupData" load_steps=3 format=3]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://pickups/pickup_data.gd" id="1_data"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/pickups/bocata_roadie.svg" id="2_icon"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_data")
|
||||||
|
id = &"bocata_roadie"
|
||||||
|
display_name = "Bocata del Roadie"
|
||||||
|
description = "Lleva tres giras en la furgoneta."
|
||||||
|
icon = ExtResource("2_icon")
|
||||||
|
color = Color("#f0ae55")
|
||||||
|
effect_type = "heal"
|
||||||
|
value = 20.0
|
||||||
|
duration = 0.0
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[gd_resource type="Resource" script_class="PickupData" load_steps=3 format=3]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://pickups/pickup_data.gd" id="1_data"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/pickups/botas_doble_bombo.svg" id="2_icon"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_data")
|
||||||
|
id = &"botas_doble_bombo"
|
||||||
|
display_name = "Botas del Doble Bombo"
|
||||||
|
description = "El bateria marca el ritmo de la carrera."
|
||||||
|
icon = ExtResource("2_icon")
|
||||||
|
color = Color("#b99afa")
|
||||||
|
effect_type = "speed_boost"
|
||||||
|
value = 0.35
|
||||||
|
duration = 8.0
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[gd_resource type="Resource" script_class="PickupData" load_steps=3 format=3]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://pickups/pickup_data.gd" id="1_data"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/pickups/casete_demo.svg" id="2_icon"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_data")
|
||||||
|
id = &"casete_demo"
|
||||||
|
display_name = "Casete de la Demo Perdida"
|
||||||
|
description = "Grabado en un garaje. Se nota."
|
||||||
|
icon = ExtResource("2_icon")
|
||||||
|
color = Color("#ec9fcd")
|
||||||
|
effect_type = "special_charge"
|
||||||
|
value = 25.0
|
||||||
|
duration = 0.0
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[gd_resource type="Resource" script_class="PickupData" load_steps=3 format=3]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://pickups/pickup_data.gd" id="1_data"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/pickups/cinta_americana.svg" id="2_icon"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_data")
|
||||||
|
id = &"cinta_americana"
|
||||||
|
display_name = "Cinta Americana Infinita"
|
||||||
|
description = "Arregla todo, menos la afinacion."
|
||||||
|
icon = ExtResource("2_icon")
|
||||||
|
color = Color("#a1c1cc")
|
||||||
|
effect_type = "shield"
|
||||||
|
value = 1.0
|
||||||
|
duration = 0.0
|
||||||
@@ -1,12 +1,15 @@
|
|||||||
[gd_resource type="Resource" script_class="PickupData" load_steps=2 format=3]
|
[gd_resource type="Resource" script_class="PickupData" load_steps=3 format=3]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://pickups/pickup_data.gd" id="1_data"]
|
[ext_resource type="Script" path="res://pickups/pickup_data.gd" id="1_data"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/pickups/coffee.svg" id="2_icon"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_data")
|
script = ExtResource("1_data")
|
||||||
id = &"coffee"
|
id = &"coffee"
|
||||||
display_name = "Café"
|
display_name = "Tostado del Averno"
|
||||||
color = Color(0.56, 0.29, 0.14, 1)
|
description = "240 BPM por las venas."
|
||||||
|
icon = ExtResource("2_icon")
|
||||||
|
color = Color("#9b6243")
|
||||||
effect_type = "speed_boost"
|
effect_type = "speed_boost"
|
||||||
value = 0.5
|
value = 0.25
|
||||||
duration = 120.0
|
duration = 12.0
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[gd_resource type="Resource" script_class="PickupData" load_steps=3 format=3]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://pickups/pickup_data.gd" id="1_data"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/pickups/cuerda_titanio.svg" id="2_icon"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_data")
|
||||||
|
id = &"cuerda_titanio"
|
||||||
|
display_name = "Cuerda de Titanio"
|
||||||
|
description = "No desafina. Tampoco perdona."
|
||||||
|
icon = ExtResource("2_icon")
|
||||||
|
color = Color("#e5e6fc")
|
||||||
|
effect_type = "damage_boost"
|
||||||
|
value = 0.2
|
||||||
|
duration = 20.0
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[gd_resource type="Resource" script_class="PickupData" load_steps=3 format=3]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://pickups/pickup_data.gd" id="1_data"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/pickups/lata_feedback.svg" id="2_icon"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_data")
|
||||||
|
id = &"lata_feedback"
|
||||||
|
display_name = "Lata de Feedback"
|
||||||
|
description = "Hace mas ruido al abrirse que el guitarrista."
|
||||||
|
icon = ExtResource("2_icon")
|
||||||
|
color = Color("#f55b78")
|
||||||
|
effect_type = "speed_boost"
|
||||||
|
value = 0.15
|
||||||
|
duration = 20.0
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[gd_resource type="Resource" script_class="PickupData" load_steps=3 format=3]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://pickups/pickup_data.gd" id="1_data"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/pickups/muelles_stage.svg" id="2_icon"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_data")
|
||||||
|
id = &"muelles_stage"
|
||||||
|
display_name = "Muelles del Stage Diving"
|
||||||
|
description = "El aterrizaje no esta incluido."
|
||||||
|
icon = ExtResource("2_icon")
|
||||||
|
color = Color("#82d8f3")
|
||||||
|
effect_type = "jump_boost"
|
||||||
|
value = 0.2
|
||||||
|
duration = 12.0
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[gd_resource type="Resource" script_class="PickupData" load_steps=3 format=3]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://pickups/pickup_data.gd" id="1_data"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/pickups/pedal_distorsion.svg" id="2_icon"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_data")
|
||||||
|
id = &"pedal_distorsion"
|
||||||
|
display_name = "Pedal de Distorsion"
|
||||||
|
description = "El tecnico de sonido ha dimitido."
|
||||||
|
icon = ExtResource("2_icon")
|
||||||
|
color = Color("#76bddc")
|
||||||
|
effect_type = "damage_boost"
|
||||||
|
value = 0.5
|
||||||
|
duration = 7.0
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[gd_resource type="Resource" script_class="PickupData" load_steps=3 format=3]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://pickups/pickup_data.gd" id="1_data"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/pickups/pizza_post_bolo.svg" id="2_icon"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_data")
|
||||||
|
id = &"pizza_post_bolo"
|
||||||
|
display_name = "Pizza Post-Bolo"
|
||||||
|
description = "La encontraron detras del amplificador."
|
||||||
|
icon = ExtResource("2_icon")
|
||||||
|
color = Color("#f9a047")
|
||||||
|
effect_type = "heal"
|
||||||
|
value = 45.0
|
||||||
|
duration = 0.0
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[gd_resource type="Resource" script_class="PickupData" load_steps=3 format=3]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://pickups/pickup_data.gd" id="1_data"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/pickups/pua_apocalipsis.svg" id="2_icon"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_data")
|
||||||
|
id = &"pua_apocalipsis"
|
||||||
|
display_name = "Pua del Apocalipsis"
|
||||||
|
description = "Tres acordes. Cero supervivientes."
|
||||||
|
icon = ExtResource("2_icon")
|
||||||
|
color = Color("#dc78f8")
|
||||||
|
effect_type = "damage_boost"
|
||||||
|
value = 0.3
|
||||||
|
duration = 12.0
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[gd_resource type="Resource" script_class="PickupData" load_steps=3 format=3]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://pickups/pickup_data.gd" id="1_data"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/pickups/setlist_fin.svg" id="2_icon"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_data")
|
||||||
|
id = &"setlist_fin"
|
||||||
|
display_name = "Setlist del Fin del Mundo"
|
||||||
|
description = "Si no queda escenario, el orden da igual."
|
||||||
|
icon = ExtResource("2_icon")
|
||||||
|
color = Color("#f1e7a3")
|
||||||
|
effect_type = "special_charge"
|
||||||
|
value = 50.0
|
||||||
|
duration = 0.0
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[gd_resource type="Resource" script_class="PickupData" load_steps=3 format=3]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://pickups/pickup_data.gd" id="1_data"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/pickups/tapones_tecnico.svg" id="2_icon"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_data")
|
||||||
|
id = &"tapones_tecnico"
|
||||||
|
display_name = "Tapones del Tecnico"
|
||||||
|
description = "Por una vez, el tecnico tenia razon."
|
||||||
|
icon = ExtResource("2_icon")
|
||||||
|
color = Color("#c2eb7e")
|
||||||
|
effect_type = "damage_reduction"
|
||||||
|
value = 0.25
|
||||||
|
duration = 12.0
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[gd_resource type="Resource" script_class="PickupData" load_steps=3 format=3]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://pickups/pickup_data.gd" id="1_data"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/pickups/tupper_bateria.svg" id="2_icon"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_data")
|
||||||
|
id = &"tupper_bateria"
|
||||||
|
display_name = "Tupper del Bateria"
|
||||||
|
description = "Ni su madre recuerda que le puso."
|
||||||
|
icon = ExtResource("2_icon")
|
||||||
|
color = Color("#83d0c5")
|
||||||
|
effect_type = "heal"
|
||||||
|
value = 70.0
|
||||||
|
duration = 0.0
|
||||||
@@ -4,12 +4,15 @@ class_name PickupData
|
|||||||
@export_category("Identity")
|
@export_category("Identity")
|
||||||
@export var id: StringName = &"pickup"
|
@export var id: StringName = &"pickup"
|
||||||
@export var display_name: String = "Item"
|
@export var display_name: String = "Item"
|
||||||
|
@export_multiline var description: String = ""
|
||||||
|
|
||||||
@export_category("Visuals")
|
@export_category("Visuals")
|
||||||
@export var icon: Texture2D
|
@export var icon: Texture2D
|
||||||
@export var color: Color = Color(1.0, 0.7, 0.2)
|
@export var color: Color = Color(1.0, 0.7, 0.2)
|
||||||
|
|
||||||
@export_category("Effect")
|
@export_category("Effect")
|
||||||
@export_enum("heal", "speed_boost") var effect_type: String = "heal"
|
## heal and special_charge are instant; shield absorbs one hit; others expire.
|
||||||
|
## value is an absolute amount for heal/charge, a fractional bonus for timed buffs.
|
||||||
|
@export_enum("heal", "speed_boost", "damage_boost", "special_charge", "shield", "damage_reduction", "jump_boost", "air_damage_boost") var effect_type: String = "heal"
|
||||||
@export var value: float = 0.0
|
@export var value: float = 0.0
|
||||||
@export var duration: float = 0.0
|
@export var duration: float = 0.0
|
||||||
@@ -200,6 +200,16 @@ var jumps_remaining: int = 2
|
|||||||
|
|
||||||
var _speed_boost_timer: float = 0.0
|
var _speed_boost_timer: float = 0.0
|
||||||
var _speed_boost_multiplier: float = 0.0
|
var _speed_boost_multiplier: float = 0.0
|
||||||
|
# Only runtime state changes: CharacterData remains immutable during pickups.
|
||||||
|
var _damage_boost_timer: float = 0.0
|
||||||
|
var _damage_boost_multiplier: float = 0.0
|
||||||
|
var _air_damage_boost_timer: float = 0.0
|
||||||
|
var _air_damage_boost_multiplier: float = 0.0
|
||||||
|
var _damage_reduction_timer: float = 0.0
|
||||||
|
var _damage_reduction_fraction: float = 0.0
|
||||||
|
var _jump_boost_timer: float = 0.0
|
||||||
|
var _jump_boost_multiplier: float = 0.0
|
||||||
|
var _shield_hits: int = 0
|
||||||
|
|
||||||
var _floating_texts: Array = []
|
var _floating_texts: Array = []
|
||||||
|
|
||||||
@@ -369,12 +379,12 @@ func _handle_jump() -> void:
|
|||||||
and not ground_pound_active
|
and not ground_pound_active
|
||||||
):
|
):
|
||||||
if is_on_floor() or coyote_timer > 0.0:
|
if is_on_floor() or coyote_timer > 0.0:
|
||||||
velocity.y = character_data.jump_velocity
|
velocity.y = character_data.jump_velocity * (1.0 + _jump_boost_multiplier)
|
||||||
jump_buffer_timer = 0.0
|
jump_buffer_timer = 0.0
|
||||||
coyote_timer = 0.0
|
coyote_timer = 0.0
|
||||||
jumps_remaining = max(0, max_jumps - 1)
|
jumps_remaining = max(0, max_jumps - 1)
|
||||||
elif enable_double_jump and jumps_remaining > 0:
|
elif enable_double_jump and jumps_remaining > 0:
|
||||||
velocity.y = character_data.jump_velocity * double_jump_multiplier
|
velocity.y = character_data.jump_velocity * (1.0 + _jump_boost_multiplier) * double_jump_multiplier
|
||||||
jump_buffer_timer = 0.0
|
jump_buffer_timer = 0.0
|
||||||
jumps_remaining -= 1
|
jumps_remaining -= 1
|
||||||
|
|
||||||
@@ -418,7 +428,7 @@ func _update_punch_damage() -> void:
|
|||||||
return
|
return
|
||||||
|
|
||||||
for area in punch_hitbox.get_overlapping_areas():
|
for area in punch_hitbox.get_overlapping_areas():
|
||||||
_damage_target(area, character_data.basic_attack_damage, punch_hit_targets)
|
_damage_target(area, roundi(character_data.basic_attack_damage * (1.0 + _damage_boost_multiplier)), punch_hit_targets)
|
||||||
|
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
@@ -456,7 +466,7 @@ func _ground_pound_impact() -> void:
|
|||||||
var hit_targets: Dictionary = {}
|
var hit_targets: Dictionary = {}
|
||||||
|
|
||||||
for area in ground_pound_hitbox.get_overlapping_areas():
|
for area in ground_pound_hitbox.get_overlapping_areas():
|
||||||
_damage_target(area, damage, hit_targets)
|
_damage_target(area, roundi(damage * (1.0 + _damage_boost_multiplier + _air_damage_boost_multiplier)), hit_targets)
|
||||||
|
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
@@ -532,9 +542,39 @@ func collect_pickup(data: PickupData) -> bool:
|
|||||||
"speed_boost":
|
"speed_boost":
|
||||||
if data.value <= 0.0 or data.duration <= 0.0:
|
if data.value <= 0.0 or data.duration <= 0.0:
|
||||||
return false
|
return false
|
||||||
_speed_boost_multiplier = data.value
|
_speed_boost_multiplier = max(_speed_boost_multiplier, data.value) if _speed_boost_timer > 0.0 else data.value
|
||||||
_speed_boost_timer = data.duration
|
_speed_boost_timer = data.duration
|
||||||
_spawn_floating_text("SPEED UP", Color(1.0, 0.8, 0.2))
|
_spawn_floating_text("SPEED UP", Color(1.0, 0.8, 0.2))
|
||||||
|
"damage_boost", "air_damage_boost", "damage_reduction", "jump_boost":
|
||||||
|
if data.value <= 0.0 or data.duration <= 0.0:
|
||||||
|
return false
|
||||||
|
# Repeated pickup refreshes time and keeps the strongest bonus.
|
||||||
|
match data.effect_type:
|
||||||
|
"damage_boost":
|
||||||
|
_damage_boost_multiplier = max(_damage_boost_multiplier, data.value) if _damage_boost_timer > 0.0 else data.value
|
||||||
|
_damage_boost_timer = data.duration
|
||||||
|
"air_damage_boost":
|
||||||
|
_air_damage_boost_multiplier = max(_air_damage_boost_multiplier, data.value) if _air_damage_boost_timer > 0.0 else data.value
|
||||||
|
_air_damage_boost_timer = data.duration
|
||||||
|
"damage_reduction":
|
||||||
|
_damage_reduction_fraction = max(_damage_reduction_fraction, data.value) if _damage_reduction_timer > 0.0 else data.value
|
||||||
|
_damage_reduction_timer = data.duration
|
||||||
|
"jump_boost":
|
||||||
|
_jump_boost_multiplier = max(_jump_boost_multiplier, data.value) if _jump_boost_timer > 0.0 else data.value
|
||||||
|
_jump_boost_timer = data.duration
|
||||||
|
_spawn_floating_text(data.display_name, data.color)
|
||||||
|
"special_charge":
|
||||||
|
var new_charge: int = mini(special_max_charge, special_charge + int(data.value))
|
||||||
|
if new_charge <= special_charge:
|
||||||
|
return false
|
||||||
|
special_charge = new_charge
|
||||||
|
special_charge_changed.emit(special_charge, special_max_charge)
|
||||||
|
_spawn_floating_text("SPECIAL +" + str(int(data.value)), data.color)
|
||||||
|
"shield":
|
||||||
|
if data.value <= 0.0:
|
||||||
|
return false
|
||||||
|
_shield_hits = maxi(_shield_hits, int(data.value))
|
||||||
|
_spawn_floating_text("SHIELD", data.color)
|
||||||
_:
|
_:
|
||||||
push_warning("Unknown pickup effect: %s" % data.effect_type)
|
push_warning("Unknown pickup effect: %s" % data.effect_type)
|
||||||
return false
|
return false
|
||||||
@@ -600,6 +640,15 @@ func take_damage(amount: int, source_position: Vector2) -> void:
|
|||||||
if amount <= 0 or is_dead or invulnerability_timer > 0.0:
|
if amount <= 0 or is_dead or invulnerability_timer > 0.0:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if _shield_hits > 0:
|
||||||
|
_shield_hits -= 1
|
||||||
|
invulnerability_timer = invulnerability_duration
|
||||||
|
_spawn_floating_text("BLOCK!", Color(0.7, 0.9, 1.0))
|
||||||
|
return
|
||||||
|
|
||||||
|
# At least one point of damage passes through an active reduction.
|
||||||
|
if _damage_reduction_timer > 0.0:
|
||||||
|
amount = maxi(1, roundi(amount * (1.0 - clampf(_damage_reduction_fraction, 0.0, 0.95))))
|
||||||
current_health = max(current_health - amount, 0)
|
current_health = max(current_health - amount, 0)
|
||||||
invulnerability_timer = invulnerability_duration
|
invulnerability_timer = invulnerability_duration
|
||||||
|
|
||||||
@@ -644,6 +693,19 @@ func _update_timers(delta: float) -> void:
|
|||||||
_speed_boost_timer = max(_speed_boost_timer - delta, 0.0)
|
_speed_boost_timer = max(_speed_boost_timer - delta, 0.0)
|
||||||
else:
|
else:
|
||||||
_speed_boost_multiplier = 0.0
|
_speed_boost_multiplier = 0.0
|
||||||
|
# Each effect expires independently; no mutation of the character resource.
|
||||||
|
_damage_boost_timer = maxf(0.0, _damage_boost_timer - delta)
|
||||||
|
_air_damage_boost_timer = maxf(0.0, _air_damage_boost_timer - delta)
|
||||||
|
_damage_reduction_timer = maxf(0.0, _damage_reduction_timer - delta)
|
||||||
|
_jump_boost_timer = maxf(0.0, _jump_boost_timer - delta)
|
||||||
|
if _damage_boost_timer == 0.0:
|
||||||
|
_damage_boost_multiplier = 0.0
|
||||||
|
if _air_damage_boost_timer == 0.0:
|
||||||
|
_air_damage_boost_multiplier = 0.0
|
||||||
|
if _damage_reduction_timer == 0.0:
|
||||||
|
_damage_reduction_fraction = 0.0
|
||||||
|
if _jump_boost_timer == 0.0:
|
||||||
|
_jump_boost_multiplier = 0.0
|
||||||
|
|
||||||
|
|
||||||
func _update_animation() -> void:
|
func _update_animation() -> void:
|
||||||
|
|||||||