Hedgehog's Spiny Status.

Aug 10, 2014, 6:14 pm
#1
Joined: Dec 4, 2007
Posts: 180
So, I had a thought. The Hedgehog has a special effect where if you attack it unarmed, you get damaged by it's quills... Is there a way to take that effect, and apply it to certain armors; or even to certain shields?
Aug 10, 2014, 8:13 pm
#2
Joined: Dec 11, 2008
Posts: 1,770
Probably, considering we've implemented acid shields that spill on opponents. As for how exactly I wouldn't know, my C knowledge is still lacking.
Aug 10, 2014, 9:32 pm
#3
Joined: Feb 20, 2012
Posts: 232
Wait, acid shields spill acid? I always assumed they were just effective at shielding against acid or something and never used them.

Anyways, here's the code for the hedgehog's spine defense:

void hedgehog::SpecialBodyDefenceEffect(character* Enemy, bodypart* BodyPart, int Type)
{
  if(Type != WEAPON_ATTACK && RAND() & 1)
  {
    if(Enemy->IsPlayer())
      ADD_MESSAGE("%s spines jab your %s!", CHAR_POSSESSIVE_PRONOUN, BodyPart->GetBodyPartName().CStr());
    else if(CanBeSeenByPlayer() || Enemy->CanBeSeenByPlayer())
      ADD_MESSAGE("%s spines jab %s!", CHAR_POSSESSIVE_PRONOUN, Enemy->CHAR_NAME(DEFINITE));

    Enemy->ReceiveBodyPartDamage(this, 1 + (RAND() & 1), PHYSICAL_DAMAGE, BodyPart->GetBodyPartIndex(), YOURSELF, false, false, true, false);
    Enemy->CheckDeath(CONST_S("killed by the pointy spines of ") + GetName(INDEFINITE), this);
  }
}

So basically if you hit it without a weapon you have a 50% chance of taking 1-2 damage to the bodypart you hit it with. You could easily cannibalize that code along with, say, the acid shield's, and come up with something like this:

void spikedshield::BlockEffect(character* Blocker, character* Attacker, item* Weapon, int Type)
{
  if(Type != WEAPON_ATTACK)
  {
    if(CanBeSeenByPlayer() || Enemy->CanBeSeenByPlayer())
      ADD_MESSAGE("%s is stabbed by the spikes of the shield!", Attacker->CHAR_DESCRIPTION(DEFINITE));

    /* Damage could be whatever; this is just the formula for Mjolak's bonus damage. */
    Enemy->ReceiveBodyPartDamage(this,  5 + (RAND() % 6), PHYSICAL_DAMAGE, BodyPart->GetBodyPartIndex(), YOURSELF, false, false, true, false); 
  }
}

This example would do damage every time you block an unarmed attack (rather than the 50% chance of the hedgehog's) because punching/biting metal spikes has got to hurt. Doing something similar with armor would be a bit more complicated, since there are no armors that have effects like this, and as such you'd need to figure out where to actually place the call to the armor's retaliation function (probably in the character::TakeHit function somewhere).
Aug 10, 2014, 9:43 pm
#4
Joined: Dec 11, 2008
Posts: 1,770
I'd really be interested in adding a bunch of novelty items along the same vein that aren't really useful but are neat uses of the code.
For example, artifact weapons that look extremely similar to the already existing ones but with typos that have bad effects - e.g. Miolak that occasionally blasts YOU, or an Eplyron that occasionally turns your arms into bananas.
Aug 11, 2014, 7:23 am
#5
red_kangaroo's avatar
elder dark mage


Joined: Apr 2, 2014
Location: North Tyris
Posts: 575
@Pent

Heh, wielding that spiked shield and a whip of thievery would be quite a bit of fun.
Aug 12, 2014, 11:55 am
#6
Joined: Dec 4, 2007
Posts: 180
4zb4 wrote
I'd really be interested in adding a bunch of novelty items along the same vein that aren't really useful but are neat uses of the code.
For example, artifact weapons that look extremely similar to the already existing ones but with typos that have bad effects - e.g. Miolak that occasionally blasts YOU, or an Eplyron that occasionally turns your arms into bananas.

This. Much of this.
Aug 12, 2014, 1:38 pm
#7
red_kangaroo's avatar
elder dark mage


Joined: Apr 2, 2014
Location: North Tyris
Posts: 575
4zb4 wrote
(...) turns your arms into bananas.

Maybe Loricatus could have a chance to turn either your weapon or your arms into banana flesh when upset, to prevent the easy abuse of Loricatus Free Banana Snack?
Aug 12, 2014, 2:47 pm
#8
Joined: Dec 4, 2007
Occupation: Perfect Soldier
Location: Astragius Galaxy
Interests: Fiana, Peace, Melons
Posts: 1,054
I feel like that's a little dramatic for a negative god effect, personally. Plus, he's a blacksmith god, so that effect would make less sense.
Aug 12, 2014, 3:12 pm
#9
Joined: Sep 22, 2008
Posts: 631
Extending the effect to random pieces of armor would be a good way to make effective use of the trick much harder and would make more sense than having your arms turn to bananas.
Aug 12, 2014, 3:21 pm
#10
Joined: Nov 22, 2008
Interests: IVAN
Posts: 1,163
Or the weapon (or armor) could be turned into spoiled banana.
Aug 12, 2014, 5:06 pm
#11
Joined: Dec 11, 2008
Posts: 1,770
I think Eagle's method would work best to prevent the exploit. You still have the effective end result of an unusable weapon (banana) but now you only have the equivalent of a spoiled banana's worth of nutrition in your hand. Though I could complain about the fact that at least a banana weapon can be changed back, I won't because that's pretty much a waste of a SoCM in my opinion.
Aug 12, 2014, 6:34 pm
#12
Joined: Feb 20, 2012
Posts: 232
4zb4 wrote
I think Eagle's method would work best to prevent the exploit. You still have the effective end result of an unusable weapon (banana) but now you only have the equivalent of a spoiled banana's worth of nutrition in your hand. Though I could complain about the fact that at least a banana weapon can be changed back, I won't because that's pretty much a waste of a SoCM in my opinion.

If the weapon was +10 or something and you screwed up and turned it to banana then it could be worth a SoCM to recover it. As far as the actual trick is concerned, its usefulness is somewhat curbed by the fact that praying to a pissed off Loricatus can result in hostile angels killing you. Hunger is rarely an issue once you get past the UT anyways, so clever use of the god mechanics if you're in a bind and need food doesn't seem too bad.
Aug 12, 2014, 7:14 pm
#13
Joined: Dec 11, 2008
Posts: 1,770
On the other hand, we're talking about IVAN here and having your +10 weapon turn into a banana because of something that would be entirely your fault does not sound out of place.
Aug 12, 2014, 10:00 pm
#14
Joined: Dec 17, 2007
Occupation: Taking Names, Formerly Kicking Ass
Location: New Jersey
Posts: 886
4zb4 wrote
On the other hand, we're talking about IVAN here and having your +10 weapon turn into a banana because of something that would be entirely your fault does not sound out of place.

I second this.
Jump to