Skip to content

Card.GetPreviousLocation ​

Signature ​

lua
Card.GetPreviousLocation(Card c) -> int

Description ​

Returns c's previous location bitmask from before its last location change.

Parameters ​

  • c Card

Returns ​

  • int

Source ​

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

Used By ​

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

  • Detected in 5 indexed script(s).
  • Search this function in the Script Explorer with Card.GetPreviousLocation.
CardIDScriptDetected Calls
Chevreuil, Hunting Scout of the Deep Forest13023431Scripts/c13023431.lua1
Raidraptor - Rising Rebellion Falcon71222868Scripts/c71222868.lua1
Evil HERO Inferno Wing - Backfire59893882Scripts/c59893882.lua1
Grenosaurus Giga-Cannon34481518Scripts/c34481518.lua2
Mirror of the Ice Barrier10691144Scripts/c10691144.lua1

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

Raidraptor - Rising Rebellion Falcon (71222868) ​

Source: Scripts/c71222868.lua

lua
end
function s.damval2(c)
	if c:GetPreviousLocation()~=LOCATION_MZONE then return end
	return math.max(0,c:GetTextAttack())
end

Evil HERO Inferno Wing - Backfire (59893882) ​

Source: Scripts/c59893882.lua

lua
		return bc:IsFaceup() and bc:IsLocation(LOCATION_MZONE) and bc:IsControler(tp) and bc:IsType(TYPE_MONSTER) and bc:IsSetCard(0x8)
	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 bc:IsPreviousSetCard(0x8)
	end