Skip to content

Commit

Permalink
Changed monsters stats
Browse files Browse the repository at this point in the history
Fixed bug with perk selection
  • Loading branch information
5253450 committed Sep 18, 2010
1 parent 4035aeb commit d2cd02e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion monsters/runner/stats
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0 0.6 1.0
1.0 0.6 1.0 0 0
2 changes: 1 addition & 1 deletion monsters/spider/stats
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7 0.6 0.7
1.7 1.0 0.7 4000 2000
2 changes: 1 addition & 1 deletion monsters/zombie/stats
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9 0.3 2.0
1.1 0.3 2.5 10000 3000
14 changes: 13 additions & 1 deletion src/program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void spawnEnemy(float x, float y, float r, int baseLvl, int lvl) {
newMonster->Id, newMonster));
}

// The beginning of new game in a survival mode
// The beginning of new game in selected mode
void startGame(std::string elementName) {
if (aim)
delete aim;
Expand Down Expand Up @@ -526,6 +526,12 @@ void refreshCharStatsWindow() {
charStats->addElement("+looting", videoManager->RegularText->getObject(
"+", r, videoManager->RegularText->getHeight() * 9.0f,
TextManager::CENTER, TextManager::MIDDLE));

if (player->WideSight)
charStats->addElement("+widesight",
videoManager->RegularText->getObject("+", r,
videoManager->RegularText->getHeight() * 10.0f,
TextManager::CENTER, TextManager::MIDDLE));
}

void increaseVioletParam(std::string elementName) {
Expand Down Expand Up @@ -1698,6 +1704,12 @@ void handlePlayer(LifeForm* lf) {
player->teleport();
player->ActionMode = PLAYER_ACT_MODE_FIRE;
player->setMask(0.0f, 1.0f, 1.0f, 1.0f);

if (player->WideSight) {
player->TargetX = player->X;
player->TargetY = player->Y;
}

delete aim;
aim = new Aim(config);
}
Expand Down
12 changes: 6 additions & 6 deletions src/system/InputHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ void InputHandler::setInputModeText(bool mandatory, std::string text) {
return;

if (mandatory)
setInputMode( TextMandatory);
setInputMode(TextMandatory);
else
setInputMode( Text);
setInputMode(Text);

m_textContent = text;
m_curTextPos = strlen(m_textContent.c_str());
Expand Down Expand Up @@ -68,9 +68,9 @@ bool InputHandler::getPressInput(GameInputEvents evnt) {
}

void InputHandler::resetMouseButtons() {
processEvent(Mouse,false,SDL_BUTTON_LEFT);
processEvent(Mouse,false,SDL_BUTTON_RIGHT);
processEvent(Mouse,false,SDL_BUTTON_MIDDLE);
processEvent(Mouse, false, SDL_BUTTON_LEFT);
processEvent(Mouse, false, SDL_BUTTON_RIGHT);
processEvent(Mouse, false, SDL_BUTTON_MIDDLE);
}

void InputHandler::processEvent(BindingType type, bool down, int value) {
Expand All @@ -83,7 +83,7 @@ void InputHandler::processEvent(BindingType type, bool down, int value) {
void InputHandler::processTextInput(SDL_Event event) {
switch (event.key.keysym.sym) {
case SDLK_ESCAPE:
setInputMode( Direct);
setInputMode(Direct);
break;
case SDLK_BACKSPACE:
if (m_curTextPos > 0)
Expand Down

0 comments on commit d2cd02e

Please sign in to comment.