Skip to content

Commit

Permalink
Merge pull request OpenDominion#584 from WaveHack/feature/the-nox
Browse files Browse the repository at this point in the history
Nox
  • Loading branch information
stromblom authored Jul 11, 2019
2 parents d30d3a0 + b0a43c1 commit 7618d13
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.
39 changes: 39 additions & 0 deletions app/data/races/nox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Nox
alignment: evil
home_land_type: swamp
perks:
food_consumption: -20
mana_production: 10
units:
- name: Imp
cost:
platinum: 300
ore: 0
power:
offense: 3
defense: 0
- name: Fiend
cost:
platinum: 325
ore: 25
power:
offense: 0
defense: 3
- name: Nightshade
cost:
platinum: 925
ore: 100
power:
offense: 0
defense: 2
perks:
defense_from_land: swamp,10,4 # land type, ratio%, max
- name: Lich
cost:
platinum: 1000
ore: 0
power:
offense: 5
defense: 2
perks:
fewer_casualties: 50
2 changes: 2 additions & 0 deletions src/Calculators/Dominion/MilitaryCalculator.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public function getOffensivePowerMultiplier(Dominion $dominion): float
$spellCrusade = 5;
$spellKillingRage = 10;
$spellWarsong = 10;
$spellNightfall = 5;

// Gryphon Nests
$multiplier += min(
Expand All @@ -144,6 +145,7 @@ public function getOffensivePowerMultiplier(Dominion $dominion): float
'crusade' => $spellCrusade,
'killing_rage' => $spellKillingRage,
'warsong' => $spellWarsong,
'nightfall' => $spellNightfall,
]);

// Prestige
Expand Down
5 changes: 5 additions & 0 deletions src/Helpers/RaceHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ public function getRaceDescriptionHtml(Race $race): string
<p>Trolls are excellent at smashing others, especially things smaller than themselves. <em>[Urg smash puny gnome!]</em></p>
TROLL;

$descriptions['Nox'] = <<<NOX
<p>The children of the night lurk in the shadows, striking terror in even the most powerful of rulers.</p>
<p>Nox can be found in the deepest darkness where even Dark Elves won't dare to trespass.</p>
NOX;

$key = strtolower($race->name);

if (!isset($descriptions[$key])) {
Expand Down
8 changes: 8 additions & 0 deletions src/Helpers/SpellHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,14 @@ public function getRacialSelfSpells(): Collection
'duration' => 12,
'races' => collect(['Troll']),
],
[
'name' => 'Nightfall',
'description' => '+5% offensive power',
'key' => 'nightfall',
'mana_cost' => 5,
'duration' => 12,
'races' => collect(['Nox']),
],
]);
}

Expand Down

0 comments on commit 7618d13

Please sign in to comment.