Skip to content

Card.GetPreviousPosition ​

Signature ​

lua
Card.GetPreviousPosition(Card c) -> int

Description ​

Returns c's previously recorded position value.

Parameters ​

  • c Card

Returns ​

  • int

Source ​

  • D:\Programs\GitHub\ygopro-core\libcard.cpp:3516

Used By ​

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

  • Detected in 20 indexed script(s).
  • Search this function in the Script Explorer with Card.GetPreviousPosition.
CardIDScriptDetected Calls
Chevreuil, Hunting Scout of the Deep Forest13023431Scripts/c13023431.lua1
Loki, Lord of the Aesir67098114Scripts/c67098114.lua1
Red-Eyes Retro Dragon53485634Scripts/c53485634.lua3
Evil HERO Inferno Wing - Backfire59893882Scripts/c59893882.lua1
Grenosaurus Giga-Cannon34481518Scripts/c34481518.lua1
Odin, Father of the Aesir93483212Scripts/c93483212.lua1
Thor, Lord of the Aesir30604579Scripts/c30604579.lua1
Digital Bug Corebage58600555Scripts/c58600555.lua1
Karakuri Super Shogun mdl 00N "Bureibu"25904894Scripts/c25904894.lua1
Ninjitsu Art of Shadow Sealing13629812Scripts/c13629812.lua1
Karakuri Gama Oil11699941Scripts/c11699941.lua1
Karakuri Steel Shogun mdl 00X "Bureido"66976526Scripts/c66976526.lua1
Morphtronic Map56074358Scripts/c56074358.lua1
Madolche Chickolates26570480Scripts/c26570480.lua1
Karakuri Anatomy85541675Scripts/c85541675.lua1
Morpho Butterspy43573231Scripts/c43573231.lua1
Attack the Moon!83715234Scripts/c83715234.lua1
Karakuri Trick House33184236Scripts/c33184236.lua1
Earthquake Giant61864793Scripts/c61864793.lua1
Time Machine80987696Scripts/c80987696.lua2

Script Examples ​

Chevreuil, Hunting Scout of the Deep Forest (13023431) ​

Source: Scripts/c13023431.lua

lua
			and bc:IsType(TYPE_MONSTER) and bc:IsRace(RACE_WARRIOR) and bc:IsAttribute(ATTRIBUTE_EARTH)
	else
		return bc:GetPreviousPosition()&POS_FACEUP>0 and bc:GetPreviousLocation()&LOCATION_MZONE==LOCATION_MZONE and bc:IsPreviousControler(tp)
			and bc:GetPreviousTypeOnField()&TYPE_MONSTER==TYPE_MONSTER and c:GetPreviousRaceOnField()&RACE_WARRIOR==RACE_WARRIOR
			and bc:GetPreviousAttributeOnField()&ATTRIBUTE_EARTH==ATTRIBUTE_EARTH

Loki, Lord of the Aesir (67098114) ​

Source: Scripts/c67098114.lua

lua
function c67098114.regop(e,tp,eg,ep,ev,re,r,rp)
	local c=e:GetHandler()
	local pos=c:GetPreviousPosition()
	if c:IsReason(REASON_BATTLE) then pos=c:GetBattlePosition() end
	if rp==1-tp and c:IsPreviousControler(tp) and c:IsReason(REASON_DESTROY)

Red-Eyes Retro Dragon (53485634) ​

Source: Scripts/c53485634.lua

lua
		and (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp or c:IsReason(REASON_BATTLE) and Duel.GetAttacker():IsControler(1-tp))
		and c:IsSetCard(0x3b) and c:IsLevelBelow(7) and c:IsControler(tp)
		and c:IsCanBeSpecialSummoned(e,0,tp,false,false,c:GetPreviousPosition())
end
function c53485634.sptg(e,tp,eg,ep,ev,re,r,rp,chk)