Jump to content

Photo

Opcodes #146 and #148


16 replies to this topic

#16 Avenger

Avenger
  • Modders
  • 3803 posts
  • Gender:Male
  • Location:Hungary

Posted 04 June 2018 - 11:03 AM

OOps, i was wrong. "there is no way the opcode will ever touch player A." is not true :D  

Actually, it uses the source of  opcode 146 (player A) for a lot of things. 

 

It would use player B as source only if it is coming from a save or something like that.

Now i can only hope it is still the same as in the original, because i have my name all over this part of the code  :wallbash:



#17 kjeron

kjeron
  • Members
  • 131 posts

Posted 06 June 2018 - 02:18 PM

Well I'm glad we have clarity :lol:

To complicate matters, I've been finding that the definition of "target" when setting contingencies with opcode 232 is incredibly vague...

 

All Objects and Triggers are in relevance to the effect target of opcode 232.

For parameter1:  // Cast Resource on Object:

0 : Myself

1 : LastHitter

2 : NearestEnemyOf

3 : NearestNotSelf

For Parameter2: // Trigger:

0 : HitBy([ANYONE]) Every time
1 : See(NearestEnemyOf(Myself)) Once per Round
2 : HPPercentLT(Myself, 50) Once per Round
3 : HPPercentLT(Myself, 25) Once per Round
4 : HPPercentLT(Myself, 10) Once per Round
5 : StateCheck(Myself,STATE_HELPLESS) Once per Round
6 : StateCheck(Myself,STATE_POISONED) Once per Round
7 : AttackedBy([ANYONE]) Every time
8 : Range([ANYONE],4) Once per Round
9 : Range([ANYONE],10) Once per Round
11 : TookDamage() Every time
12 : Killed([ANYONE]) Every time
13 : TimeOfDay('Special') Once per Round
14 : Range([ANYONE],'Special') Once per Round
15 : StateCheck(Myself,'Special') Once per Round
16 : Died(Myself) Every time
17 : Died([ANYONE]) Every time
18 : TurnedBy([ANYONE]) Every time
19 : HPLT(Myself,'Special') Once per Round
20 : HPPercentLT(Myself,'Special') Once per Round
21 : CheckSpellState(Myself,'Special') Once per Round

 

The triggers and objects are still limited to their normal detection range, i.e. "Died([ANYONE])" won't see someone dying on the other side of the map.

"NearestEnemyOf", and "LastHitter" must be currently valid objects in order to trigger.

Excluding the Range() checks, [ANYONE] includes "Myself".

 

The [Resource] is cast using a similar structure to opcode 146[P2=1]:

"Self" affects the creature with opcode 232.

"Preset" affects the [Object] that [Resource] is cast on.

"Original Caster" affects the creature with opcode 232.

However, that [Object] must be within range of the [Resource] or the whole spell will fail.

 

edit - this forum butchers formatting.


Edited by kjeron, 06 June 2018 - 02:20 PM.




Reply to this topic



  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users