Nethack Wizard Staff patch

Um novo cajado que pode acumular energia.
Baseado numa idéia original de Oscar Kind
(r.g.r.n)
A new staff which can absorb and release energy.
Based on an original idea from Oscar Kind
(r.g.r.n)
Download (3.4.2, pode ser aplicado emcan be applied to 3.4.3): wstaff-nh342.patch
Documentação (em inglês):Documentation:

Nethack wizard staff patch

Nethack 3.4.2 Wizard staff patch 0.2
by SmileyByte
Adds a new kind of staff to Nethack: a wizard staff. Basically, it can be used to store energy and release later, when the player has no more energy to cast a spell.
To apply this patch, enter the nethack sources directory and type
patch -p0 < wstaff-nh342.patch
Wizard staff: +0 to-hit, 6 sdam, 5 ldam, material: wood
When wielded and (a)pplied, a wizard staff absorbs some energy from the player and stores it, up to a maximum of 500 stored energy. Then, when the player casts a spell that requires more energy than the available, and (s)he is wielding the staff, it releases some of its stored energy (just enough to cast the spell). So, they can be used by wizards and spellcasters as containers of energy.

When used as a melee weapon, the staff adds min(obj->spe,0)+1 of damage, and wastes the same number of the stored energy. E.g. a wizard staff at +0 would add 1 point of damage and waste 1 MP; a +5 staff would add 6 points of damage and wasting 6 MP. Negative enchantments works as if at +0.
The energy stored in the staff is very unstable, and one needs to wields the staff continually to avoid energy loss. Since it would be very tricky to check every turn for the staff being wielded/unwielded, so this is done as following: each time one of the following occurs

  • The staff is (a)pplied;
  • The additional damage is calculated (that is, the staff is used to bash a monster);
  • Some energy is liberated from the staff to cast a spell;

then is checked how much time passed since one of this actions occured; if the time passed is greater than 300-(enchantment without signal * 50) then some of the energy is lost: (enchantment without signal+1 * 10)% of the amount stored. The player senses that some energy was lost if he has intelligence above 10.
The amount of energy absorbed each time is also dependent of the enchantment level. The formula used is:
i = (u.uen * (9 – obj->spe)) / 10;
i = min(i, 100 – (obj->spe*10) – (obj->recharged*5));
i = min(i, u.uen);
The table below summarizes the paragraphs above:

Enchantment
level
Absorbs
up to %
of your
energy…
…but only to a maximum of: Energy loss
Timeout
for using
the staff
Stored
energy
lost
-5 100% 125 – (full recharges * 10) 50 60%
-4 100% 120 100 50%
-3 100% 115 150 40%
-2 100% 110 200 30%
-1 100% 105 250 20%
0 90% 100 300 10%
+1 80% 95 250 20%
+2 70% 90 200 30%
+3 60% 85 150 40%
+4 50% 80 100 50%
+5 40% 75 50 60%

Where a ‘full recharge’ is counted every time the player tries to charge the staff above its limit of 500 energy units. Note that due to the limit of the recharge counter (obj->recharge) it only records a maximum of 7 full recharges. So, if the staff is at +0 and the player tried to recharge it above its limit seven times, the staff will absorb only 30 energy units or 90% of the player’s energy, the less of the two. If the player enchants this same staff to +5, it will not absorb energy anymore (minimum of 50 – 7*10 = -20 !)
Also note that when charged above the limit, the exceeding energy is released and hurts the player (the amount of exceeding energy is subtracted from his HP).


To-do / Plans

  • If already identified, the wizard staff should display its current charge?

History

0.2

  • Bonus damage added, timeout to charge removed, added energy loss if not used within a certain time

0.1

  • First version, wizard staff can be used to store energy, depending of enchantment level and current energy; has a timeout depending of ench. level.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *