Skip to content

Effect.SetAbsoluteRange ​

Signature ​

lua
Effect.SetAbsoluteRange(Effect e, int playerid, int s_range, int o_range) -> void

Description ​

Sets e's target range from an absolute player viewpoint and marks the effect with EFFECT_FLAG_ABSOLUTE_TARGET. If playerid is 1, the supplied ranges are swapped internally so the stored ranges still line up with player 0/player 1 absolute handling.

How To Use It ​

Use this for field effects whose affected side must be fixed to player 0/player 1 instead of relative to the handler's controller.

lua
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,0,LOCATION_MZONE)

The core stores the ranges with EFFECT_FLAG_ABSOLUTE_TARGET set. If playerid is 1, it swaps s_range and o_range internally so the final effect still points at the intended absolute player.

Parameters ​

  • e Effect
  • playerid int
  • s_range int
  • o_range int

Source ​

  • D:\Programs\GitHub\ygopro-core\libeffect.cpp:616

Used By ​

Generated from the local Scripts/ folder and cards.cdb.

  • Detected in 42 indexed script(s).
  • Search this function in the Script Explorer with Effect.SetAbsoluteRange.
CardIDScriptDetected Calls
Gouki Sheik Ogre7382007Scripts/c7382007.lua1
Unchained Firelord of Yama94014327Scripts/c94014327.lua1
Performage Wind Drainer70417076Scripts/c70417076.lua1
Readying of Rites71771004Scripts/c71771004.lua1
Swordsoul Assessment78836195Scripts/c78836195.lua1
Assault Synchron77202120Scripts/c77202120.lua1
Gouki Machine Suprex29099860Scripts/c29099860.lua1
Elfnotes: Quatrain of Succession58809685Scripts/c58809685.lua1
Outburst Dragon87263576Scripts/c87263576.lua1
K9-04 Noroi47960073Scripts/c47960073.lua1
Swordsoul of Mo Ye20001443Scripts/c20001443.lua1
NEXT74414885Scripts/c74414885.lua1
Thunder Dragons' Hundred Thunders82045034Scripts/c82045034.lua2
Astral Kuriboh64591429Scripts/c64591429.lua1
Numbers Eveil20994205Scripts/c20994205.lua2
Swordsoul Strategist Longyuan93490856Scripts/c93490856.lua1
Lunalight Silver Hound35763582Scripts/c35763582.lua1
Odd-Eyes Solblaze Dragon29325276Scripts/c29325276.lua1
Unchained Soul of Sharvara41165831Scripts/c41165831.lua1
Libromancer Realized15590355Scripts/c15590355.lua1
Super Hippo Carnival11050415Scripts/c11050415.lua1
Swordsoul Blackout14821890Scripts/c14821890.lua1
Nordic Relic Hlidskjalf7320132Scripts/c7320132.lua1
Guard Mantis53754104Scripts/c53754104.lua1
...and 18 more

Script Examples ​

Gouki Sheik Ogre (7382007) ​

Source: Scripts/c7382007.lua

lua
			e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
			e1:SetRange(LOCATION_MZONE)
			e1:SetAbsoluteRange(tp,1,0)
			e1:SetTarget(s.splimit)
			e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CONTROL)

Unchained Firelord of Yama (94014327) ​

Source: Scripts/c94014327.lua

lua
			e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
			e1:SetRange(LOCATION_MZONE)
			e1:SetAbsoluteRange(tp,1,0)
			e1:SetTarget(s.splimit)
			e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CONTROL)

Performage Wind Drainer (70417076) ​

Source: Scripts/c70417076.lua

lua
		e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
		e1:SetRange(LOCATION_MZONE)
		e1:SetAbsoluteRange(tp,1,0)
		e1:SetTarget(s.splimit)
		e1:SetReset(RESET_EVENT+RESETS_STANDARD)