Skip to content

Commit

Permalink
ADDED: cambio textos del tutorial, tint sobre los objetos del tutorial.
Browse files Browse the repository at this point in the history
Co-Authored-By: auroraGJ <[email protected]>
  • Loading branch information
Sounagix and auroraGJ committed May 7, 2022
1 parent 5c7ca70 commit bd848db
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 49 deletions.
13 changes: 11 additions & 2 deletions src/Sources/Inventory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,8 @@ void Inventory::printCompareObject() const
}
}
else if (auxType == equipType::SwordI || auxType == equipType::SwordII
|| auxType == equipType::SaberI || auxType == equipType::SaberII) {
|| auxType == equipType::SaberI || auxType == equipType::SaberII)
{

if (select_->isEquipped()) {
auxTex1 = "da" + Resources::tildes_["ñ"] + "o: " + to_string((int)static_cast<Equipment*>(equipment_.sword_->getObject())->getMeleeDmg());
Expand All @@ -549,7 +550,6 @@ void Inventory::printCompareObject() const
auxTex2 = "AtaqueVel.: " + to_string(aux2);
}
}

else if (auxType == equipType::PistolI || auxType == equipType::PistolII
|| auxType == equipType::ShotgunI || auxType == equipType::ShotgunII) {

Expand Down Expand Up @@ -685,24 +685,33 @@ void Inventory::update() {
}
else if (equipment_.potion1_ == nullptr && SDL_HasIntersection(&selectedRect, &rectPot1) && select_->getObject()->getObjectType() == ObjectType::Usable) {
selectObject(select_);
usable* auxPotion = static_cast<usable*>(select_->getObject());
gm_->setObjectEquipped((ObjectName)auxPotion->getType(), Key::One);
equipObject();
}
else if (equipment_.potion2_ == nullptr && SDL_HasIntersection(&selectedRect, &rectPot2) && select_->getObject()->getObjectType() == ObjectType::Usable) {
selectObject(select_);
usable* auxPotion = static_cast<usable*>(select_->getObject());
gm_->setObjectEquipped((ObjectName)auxPotion->getType(), Key::Two);
equipObject();
}
else if (equipment_.potion1_ != nullptr && SDL_HasIntersection(&selectedRect, &equipment_.potion1_->getDestiny()) && select_->getObject()->getObjectType() == ObjectType::Usable) {
selectObject(select_);
usable* auxPotion = static_cast<usable*>(select_->getObject());
gm_->setObjectEquipped((ObjectName)auxPotion->getType(), Key::One);
equipObject();
}
else if (equipment_.potion2_ != nullptr && SDL_HasIntersection(&selectedRect, &equipment_.potion2_->getDestiny()) && select_->getObject()->getObjectType() == ObjectType::Usable) {
selectObject(select_);
usable* auxPotion = static_cast<usable*>(select_->getObject());
gm_->setObjectEquipped((ObjectName)auxPotion->getType(), Key::Two);
equipObject();
}
else if (SDL_HasIntersection(&selectedRect, &equipment_.sword_->getDestiny())) {
selectObject(select_);
equipObject();
}

}
else if (select_ != nullptr && dragging) {
if (eventHandler_->mouseMotionEvent()) {
Expand Down
40 changes: 24 additions & 16 deletions src/Sources/TextBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,14 @@ void TextBox::dialogElderMan(int num) {
case 1:
skipTutorial_->setPos(Vector2D{ app_->getWindowWidth() - skipTutorial_->getScaleX() - lineSpacing, dest.y + (double)lineSpacing * 3 });

// upgrateOK
text.loadFromText(app_->getRenderer(), "Usa tu pistola con click derecho para romper esa botella que me recuerda al amor de ella.",
app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.render(lineSpacing, dest.y + lineSpacing);
break;
case 2:
text.loadFromText(app_->getRenderer(), "Presionando una " + Resources::tildes_["u"] + "nica vez el click izquierdo sobre un enemigo, puedes mocharlo.",
// upgrateOK
text.loadFromText(app_->getRenderer(), "Presionando una " + Resources::tildes_["u"] + "nica vez el click izquierdo sobre un enemigo, puedes atacar con la espada.",
app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.render(lineSpacing, dest.y + lineSpacing);
text.loadFromText(app_->getRenderer(), "Te recomiendo limpiar tu espada despu" + Resources::tildes_["e"] + "s .",
Expand All @@ -189,10 +191,11 @@ void TextBox::dialogElderMan(int num) {
case 3:
switch (num) {
case 0:
text.loadFromText(app_->getRenderer(), "Mira abajo a la derecha, son tus puntos de haza" + Resources::tildes_["ñ"] + "a",
// upgrateOK
text.loadFromText(app_->getRenderer(), "Mira abajo a la derecha en la interfaz, son tus puntos de haza" + Resources::tildes_["ñ"] + "a.",
app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.render(lineSpacing, dest.y + lineSpacing);
text.loadFromText(app_->getRenderer(), "Puedes verlos en la esquina derecha de abajo. Se consiguen al ganar experiencia.",
text.loadFromText(app_->getRenderer(), "Se consiguen al matar enemigos.",
app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.render(lineSpacing, dest.y + lineSpacing * 2);
text.loadFromText(app_->getRenderer(), "Abre el menu de habilidades con la 'V' y s" + Resources::tildes_["u"] + "malos a la segunda rama.",
Expand All @@ -203,27 +206,29 @@ void TextBox::dialogElderMan(int num) {
button_->update();
break;
case 1:
text.loadFromText(app_->getRenderer(), "Al desbloquear la habilidad haz click sobre esta y luego haz click sobre el acceso (Q, W, E) que te guste.", app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
// upgrateOK
text.loadFromText(app_->getRenderer(), "Al desbloquear una habilidad puedes equiparla haciendo click en ella y pulsando las teclas.", app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.render(lineSpacing, dest.y + lineSpacing);

text.loadFromText(app_->getRenderer(), "Ahora usa ese acesso para activar la habilidad y mocha al susodicho.", app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.loadFromText(app_->getRenderer(), "(QWE) creando un acceso r" + Resources::tildes_["a"] + "pido." , app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.render(lineSpacing, dest.y + (lineSpacing * 2));

text.loadFromText(app_->getRenderer(), "Utilizar una habilidad te consumir" + Resources::tildes_["a"] + " man" + Resources::tildes_["a"] + ", puedes ver la cantidad que tienes en la barra", app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.loadFromText(app_->getRenderer(), "Utilizar una habilidad consumir" + Resources::tildes_["a"] + " man" + Resources::tildes_["a"] + ", puedes ver la cantidad que tienes en el tim" + Resources::tildes_["o"] + "n.", app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.render(lineSpacing, dest.y + (lineSpacing * 3));

text.loadFromText(app_->getRenderer(), "azul del tim" + Resources::tildes_["o"] + "n.", app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.loadFromText(app_->getRenderer(), "Prueba ahora con tu nueva habilidad matar al mu" +Resources::tildes_["ñ"] + "eco", app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.render(lineSpacing, dest.y + (lineSpacing * 4));
break;
}
break;
case 5:
switch (num) {
case 0:
text.loadFromText(app_->getRenderer(), "Algunas veces encontrar" + Resources::tildes_["a"] + "s tesoros, no lo dudes " + Resources::tildes_["¡"] + Resources::tildes_["¡"] + "m" + Resources::tildes_["o"] + "chalos a todos!!",
// upgrateOK
text.loadFromText(app_->getRenderer(), "Algunas veces encontrar" + Resources::tildes_["a"] + "s tesoros en tus aventuras.",
app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.render(lineSpacing, dest.y + lineSpacing);
text.loadFromText(app_->getRenderer(), "Usa el oro del cofre para comprar una poci" + Resources::tildes_["o"] + "n a ese t" + Resources::tildes_["i"] + "o mas verde que t" + Resources::tildes_["u"] + ".",
text.loadFromText(app_->getRenderer(), "Usa el oro del cofre para comprar una poci" + Resources::tildes_["o"] + "n al lagarto.",
app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.render(lineSpacing, dest.y + lineSpacing * 2);
text.loadFromText(app_->getRenderer(), "Si te sobra algo podr" + Resources::tildes_["i"] + "as comprarme un ron, " + Resources::tildes_["¿"] + "no?",
Expand All @@ -233,20 +238,22 @@ void TextBox::dialogElderMan(int num) {
button_->update();
break;
case 1:
text.loadFromText(app_->getRenderer(), "Abre el inventario con la tecla 'C' y equ" + Resources::tildes_["i"] + "pala con el bot" + Resources::tildes_["o"] + "n verde.", app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
// upgrateOK
text.loadFromText(app_->getRenderer(), "Abre el inventario con la tecla 'C' y equ" + Resources::tildes_["i"] + "pala.", app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.render(lineSpacing, dest.y + lineSpacing);

text.loadFromText(app_->getRenderer(), "Los objetos equipados se usan con los accesos '1' y '2' respectivamente.", app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.loadFromText(app_->getRenderer(), "Los objetos equipados se usan con las teclas '1' y '2'.", app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.render(lineSpacing, dest.y + (lineSpacing * 2));

text.loadFromText(app_->getRenderer(), "Prueba a beberte la poci" + Resources::tildes_["o"] + "n, ver" + Resources::tildes_["a"] + "s como te sube la cantidad de man" + Resources::tildes_["a"] + ".", app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.loadFromText(app_->getRenderer(), "B" + Resources::tildes_["e"] + "bete la poci" + Resources::tildes_["o"] + "n como si fuera ron.", app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.render(lineSpacing, dest.y + (lineSpacing * 3));
break;
}
break;
case 6:
switch (num) {
case 0:
case 0:
// upgrateOK
skipTutorial_->setTexture(app_->getTextureManager()->getTexture(Resources::ButtonFinishTutorial));
text.loadFromText(app_->getRenderer(), "Ten cuidado ah" + Resources::tildes_["i"] + " fuera porque si eres derrotada podr" + Resources::tildes_["e"] + " ir a salvarte",
app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
Expand All @@ -261,13 +268,14 @@ void TextBox::dialogElderMan(int num) {
button_->update();
break;
case 1:
text.loadFromText(app_->getRenderer(), "Actuar" + Resources::tildes_["a"] + " como diana para los enemigos y disparar" + Resources::tildes_["a"] + " donde t" + Resources::tildes_["u"] + " lo hagas.",
// upgrateOK
text.loadFromText(app_->getRenderer(), "Actuar" + Resources::tildes_["a"] + " como se"+ Resources::tildes_["ñ"]+"uelo.",
app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.render(lineSpacing, dest.y + lineSpacing);
text.loadFromText(app_->getRenderer(), "Adem" + Resources::tildes_["a"] + "s podr" + Resources::tildes_["a"] + "s mejorarla con los puntos de haza" + Resources::tildes_["ñ"] + "a para que tambi" + Resources::tildes_["e"] + "n pueda mochar.",
text.loadFromText(app_->getRenderer(), "Adem" + Resources::tildes_["a"] + "s podr" + Resources::tildes_["a"] + "s mejorarla con los puntos de haza" + Resources::tildes_["ñ"] + "a.",
app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.render(lineSpacing, dest.y + lineSpacing * 2);
text.loadFromText(app_->getRenderer(), "Bueno, si me disculpas, hoy tocha pecho y biceps.",
text.loadFromText(app_->getRenderer(), "Bueno, si me disculpas, hoy toca pecho y biceps.",
app_->getFontManager()->getFont(Resources::FontId::RETRO), { COLOR(0x00000000) });
text.render(lineSpacing, dest.y + lineSpacing * 3);
break;
Expand Down
86 changes: 55 additions & 31 deletions src/Sources/save_data/save2.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,77 @@
{
"currIsland": 2,
"unlockedIsland": 2,
"currGold": 438,
"stashGold": 5643,
"skillPoints": 415,
"unlockedIsland": 3,
"currGold": 0,
"stashGold": 16600,
"skillPoints": 1308,
"precision": 300,
"melee": 173,
"melee": 300,
"clon": 300,
"questStarted": [true, true, true, true, true],
"questFinished": [true, false, true, false, false],
"rewardObtained": [true, false, true, false, false],
"unlockedSkills": [true, true, true, true, false, false, true, true, true, true],
"questStarted": [true, false, false, false, true],
"questFinished": [true, false, true, false, true],
"rewardObtained": [true, false, false, false, false],
"unlockedSkills": [true, true, true, true, true, true, true, true, true, true],
"skills": ["Perforante", "Rebote", "Explosion"],
"objects": ["null", "null"],
"objects": ["Health", "Armor"],
"equipment": [{
"name": 0,
"price": 156,
"armor": 13.000000,
"health": 512.000000
"price": 192,
"armor": 15.000000,
"health": 867.000000
}, {
"name": 3,
"price": 105,
"armor": 30.000000,
"critic": 35.000000
"name": 2,
"price": 97,
"armor": 7.000000,
"critic": 75.000000
}, {
"name": 4,
"price": 121,
"armor": 5.000000,
"speed": 21.000000
"price": 188,
"armor": 8.000000,
"speed": 51.000000
}, {
"name": 6,
"price": 195,
"rate": 190.000000,
"damage": 260.000000
"name": 7,
"price": 233,
"rate": 308.000000,
"damage": 574.000000
}, {
"name": 11,
"price": 220,
"price": 364,
"rate": 1000.000000,
"damage": 1000.000000
"damage": 440.000000
}],
"inventory": [{
"type": 1,
"name": 1
}, {
"type": 1,
"name": 2
}, {
"type": 1,
"name": 3
}, {
"type": 1,
"name": 3
}, {
"type": 1,
"name": 1
}, {
"type": 0,
"name": 12,
"price": 328.000000,
"name": 13,
"price": 293.000000,
"rate": 300.000000,
"damage": 101.000000
"damage": 280.000000
}, {
"type": 0,
"name": 2,
"price": 344.000000,
"armor": 5.000000,
"critic": 164.000000
}, {
"type": 1,
"name": 3
}],
"inventorySize": 1,
"inventorySize": 8,
"stash": [],
"stashSize": 0,
"completedZones": [false, false, false, false, false, false, false, false, false, false, false, false]
"completedZones": [true, true, true, true, true, false, false, false, false, false, false, false]
}
1 change: 1 addition & 0 deletions src/Sources/tutorialObject.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "tutorialObject.h"

bool tutorialObject::update() {
Enemy::manageTint();
//Solo entra con el dummy
if (currState_ == STATE::DYING) {
if (id_ >= 2) app_->getAudioManager()->playChannel(Resources::AudioId::DummyDie, 0, (int)EFFECT::TUTORIAL);
Expand Down

0 comments on commit bd848db

Please sign in to comment.