Skip to content

Commit

Permalink
Remove endurance.
Browse files Browse the repository at this point in the history
Closes #25, and probably simplifies #8.
  • Loading branch information
colons committed Jun 21, 2017
1 parent 4259fb2 commit fa6fefc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
5 changes: 2 additions & 3 deletions battle.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,10 @@ function BattleIdol(idol, control) {
}

self.attack = modStat(idol.attack + idol.attackBonus, 100);
self.defense = modStat(idol.defense + idol.defenseBonus, 50);
self.endurance = modStat(idol.endurance + idol.enduranceBonus, 50);
self.defense = modStat(idol.defense + idol.defenseBonus, 100);
self.speed = modStat(idol.speed + idol.speedBonus, 20);

self.maxHp = self.endurance;
self.maxHp = 50;
self.hp = self.maxHp;

self.abilities = idol.abilities;
Expand Down
3 changes: 0 additions & 3 deletions game.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var VOWELS = 'aeiou';
var N = 'n';
var STATS = [
'endurance',
'attack',
'speed',
'defense'
Expand Down Expand Up @@ -59,7 +58,6 @@ var endString = 'end';
var idolSorters = {
date: function(a, b) { return b.recruitedAt - a.recruitedAt; },
statSpeed: function(a, b) { return (b.speed + b.speedBonus) - (a.speed + a.speedBonus); },
statEndurance: function(a, b) { return (b.endurance + b.enduranceBonus) - (a.endurance + a.enduranceBonus); },
statAttack: function(a, b) { return (b.attack + b.attackBonus) - (a.attack + a.attackBonus); },
statDefense: function(a, b) { return (b.defense + b.defenseBonus) - (a.defense + a.defenseBonus); },
unitMembership: function(a, b) { return (Number(b.isInUnit()) - Number(a.isInUnit())); },
Expand All @@ -73,7 +71,6 @@ var idolSorters = {
var idolSortNames = {
date: 'Date recruited',
statSpeed: 'Speed',
statEndurance: 'Endurance',
statAttack: 'Attack',
statDefense: 'Defense',
allStats: 'Total of all stats',
Expand Down
4 changes: 0 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ <h2 class="name affinity-{{affinity}}">{{name}}</h2>
<dd>{{defense}} +{{defenseBonus}}</dd>
<dt>Speed</dt>
<dd>{{speed}} +{{speedBonus}}</dd>
<dt>Endurance</dt>
<dd>{{endurance}} +{{enduranceBonus}}</dd>
</dl>
<p class="rarity">{{rarity}}</p>
</div>
Expand Down Expand Up @@ -268,8 +266,6 @@ <h2>Are you sure you want {{idol.name}} to “train with” {{food.name}}?</h2>
<dd>{{idol.defense}} + {{food.defense}}{{#if negativeStats.defense}}/2{{/if}} = <strong>{{summedStats.defense}}</strong></dd>
<dt>Speed</dt>
<dd>{{idol.speed}} + {{food.speed}}{{#if negativeStats.speed}}/2{{/if}} = <strong>{{summedStats.speed}}</strong></dd>
<dt>Endurance</dt>
<dd>{{idol.endurance}} + {{food.endurance}}{{#if negativeStats.endurance}}/2{{/if}} = <strong>{{summedStats.endurance}}</strong></dd>
</dl>

<p class="actions"><a href="#" class="yes">Yes, “train”</a> <a href="#" class="no">No, it's okay</a></p>
Expand Down

0 comments on commit fa6fefc

Please sign in to comment.