Skip to content

RushDuel.IsPreviousRace ​

Alias: RD.IsPreviousRace. Requires the matching Rush Duel Lua bootstrap.

Signature ​

lua
RushDuel.IsPreviousRace(any card, any race) -> any

Description ​

Rush Duel helper declared in RDCondition.lua. Its argument names are extracted from the pinned source; parameter and return types have not yet been reviewed.

Upstream source comment ​

text
条件: 位置变化前的种族

Parameters ​

  • card any: Type and behavior are not yet reviewed; see the source.
  • race any: Type and behavior are not yet reviewed; see the source.

Returns ​

  • any: Return contract has not been reviewed; inspect the source below.

Source ​

Rush/Utilities/RDCondition.lua:206

lua
function RushDuel.IsPreviousRace(card, race)
    return (card:GetPreviousRaceOnField() & race) ~= 0
end

Used By ​

Generated from the local Rush/Scripts/ folder and rush_cards.cdb.

  • Detected in 14 indexed script(s).
  • Search this function in the Script Explorer with RushDuel.IsPreviousRace.
CardIDScriptDetected Calls
Earth Pressure Explosion120155058Rush/Scripts/c120155058.lua1
Last Day of the Pretty☆Witch120170046Rush/Scripts/c120170046.lua1
Mother's Storm120217062Rush/Scripts/c120217062.lua1
Dark Ruler Sword Swipe120188030Rush/Scripts/c120188030.lua1
RB Dragophone120225032Rush/Scripts/c120225032.lua1
Transam Alive120216028Rush/Scripts/c120216028.lua1
Breaking News!120199063Rush/Scripts/c120199063.lua1
Dark Nebula120235059Rush/Scripts/c120235059.lua1
Archfiend's Revival120170062Rush/Scripts/c120170062.lua1
Constructor Resurrection120151033Rush/Scripts/c120151033.lua1
Quantum Hole120150020Rush/Scripts/c120150020.lua1
Vengeful Dragon's Counterattack120110014Rush/Scripts/c120110014.lua1
Trumpet Charge120184005Rush/Scripts/c120184005.lua1
Psychicounter120183059Rush/Scripts/c120183059.lua1

Script Examples ​

Earth Pressure Explosion (120155058) ​

Source: Rush/Scripts/c120155058.lua

lua
--Activate
function cm.confilter(c,tp,re,rp)
	return c:IsPreviousPosition(POS_ATTACK) and RD.IsPreviousRace(c,RACE_PYRO)
		and RD.IsPreviousControler(c,tp) and c:IsPreviousLocation(LOCATION_MZONE)
		and (c==Duel.GetAttackTarget()

Last Day of the Pretty☆Witch (120170046) ​

Source: Rush/Scripts/c120170046.lua

lua
	RD.SelectAndDoAction(HINTMSG_DESTROY,cm.filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
		if Duel.Destroy(g,REASON_EFFECT)~=0
			and RD.IsPreviousRace(g:GetFirst(),RACE_SPELLCASTER)
			and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
			and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then

Mother's Storm (120217062) ​

Source: Rush/Scripts/c120217062.lua

lua
	RD.SelectAndDoAction(HINTMSG_DESTROY,cm.filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
		if Duel.Destroy(g,REASON_EFFECT)~=0
			and RD.IsPreviousRace(g:GetFirst(),RACE_MACHINE)
			and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
			and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then