RushDuel.ChangePosition
Alias: RD.ChangePosition. Requires the matching Rush Duel Lua bootstrap.
Signature
lua
RushDuel.ChangePosition(any target, any effect, any player, any reason, any pos) -> anyDescription
Rush Duel helper declared in RDAction.lua. Its argument names are extracted from the pinned source; parameter and return types have not yet been reviewed.
Upstream source comment
text
操作: 改变表示形式Parameters
targetany: Type and behavior are not yet reviewed; see the source.effectany: Type and behavior are not yet reviewed; see the source.playerany: Type and behavior are not yet reviewed; see the source.reasonany: Type and behavior are not yet reviewed; see the source.posany: 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/RDAction.lua:236
lua
function RushDuel.ChangePosition(target, effect, player, reason, pos)
local hints = Group.CreateGroup()
local group = RushDuel.ToGroup(target):Filter(RushDuel.FilterChangePositionTarget, nil, effect, player, reason, hints)
local tc = hints:GetFirst()
if tc then
Duel.Hint(HINT_CARD, 0, tc:GetOriginalCode())
end
if group:GetCount() > 0 then
if pos == nil then
return Duel.ChangePosition(group, POS_FACEUP_DEFENSE, POS_FACEUP_DEFENSE, POS_FACEUP_ATTACK, POS_FACEUP_ATTACK)
else
return Duel.ChangePosition(group, pos)
end
else
return 0
end
endUsed By
Generated from the local Rush/Scripts/ folder and rush_cards.cdb.
- Detected in 178 indexed script(s).
- Search this function in the Script Explorer with
RushDuel.ChangePosition.
Script Examples
Valkyrian Guard (120231066)
Source: Rush/Scripts/c120231066.lua
lua
local filter=RD.Filter(cm.posfilter,e,tp)
RD.CanSelectGroupAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,filter,cm.poscheck,tp,LOCATION_MZONE,0,1,3,nil,function(g)
if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)~=0 then
local og=Duel.GetOperatedGroup()
og:ForEach(function(tc)Freshberry Collaboration (120301071)
Source: Rush/Scripts/c120301071.lua
lua
local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)~=0 and e:GetLabel()==1 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
Duel.Destroy(sg,REASON_EFFECT)Fuden Issen (120309034)
Source: Rush/Scripts/c120309034.lua
lua
local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)~=0
and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.SelectEffectYesNo(tp,g:GetFirst(),aux.Stringid(m,1)) then