Jump to content

Photo

[Solved] Sword beams only with low health?


  • Please log in to reply
16 replies to this topic

#16 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 19 February 2020 - 09:11 PM

Wow, thank you very much! I could have never found the solution by myself.

I've updated the OP just in case someone comes across this corner case behaviour.

 

Out of curiosity, how did you find out?

I... opened the source code. I would not have found it otherwise.

bool perilbeam = (perilid>=0 && wpnid>=0 && game->get_life()<=itemsbuf[perilid].misc1*HP_PER_HEART
				  && checkmagiccost(perilid)
				  // Must actually be able to shoot sword beams
				  && ((itemsbuf[wpnid].flags & ITEM_FLAG1)
					  || itemsbuf[wpnid].misc1 <= game->get_maxlife()/HP_PER_HEART));

That `ITEM_FLAG1` thing is the `B. H. is Percent` flag. Fun, isn't it?



#17 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 20 February 2020 - 07:59 AM

:drool:

 

Needs a QR or an item flag of some sort, not a raw fix,

 

Wasn't intended, but like every other unintended issue, it was surely exploited.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users