RushDuel.CreateRaceCannotAttackEffect
Alias: RD.CreateRaceCannotAttackEffect. Requires the matching Rush Duel Lua bootstrap.
Signature
lua
RushDuel.CreateRaceCannotAttackEffect(any e, any desc, any race, any player, any s_range, any o_range, any reset) -> anyDescription
Rush Duel helper declared in RDLimit.lua. Its argument names are extracted from the pinned source; parameter and return types have not yet been reviewed.
Upstream source comment
text
创建限制: 不能用某些种族攻击Parameters
eany: Type and behavior are not yet reviewed; see the source.descany: Type and behavior are not yet reviewed; see the source.raceany: Type and behavior are not yet reviewed; see the source.playerany: Type and behavior are not yet reviewed; see the source.s_rangeany: Type and behavior are not yet reviewed; see the source.o_rangeany: Type and behavior are not yet reviewed; see the source.resetany: 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/RDLimit.lua:45
lua
function RushDuel.CreateRaceCannotAttackEffect(e, desc, race, player, s_range, o_range, reset)
local s_target, o_traget = 0, 0
if s_range == 1 then
s_target = LOCATION_MZONE
end
if o_range == 1 then
o_traget = LOCATION_MZONE
end
local e1 = Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(s_target, o_traget)
e1:SetTarget(function(e, c)
return c:IsRace(race)
end)
e1:SetReset(reset)
Duel.RegisterEffect(e1, player)
local e2 = Effect.CreateEffect(e:GetHandler())
e2:SetDescription(desc)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_PLAYER_RACE_CANNOT_ATTACK)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CLIENT_HINT)
e2:SetTargetRange(s_range, o_range)
e2:SetValue(race)
e2:SetReset(reset)
Duel.RegisterEffect(e2, player)
return e1, e2
endUsed By
Generated from the local Rush/Scripts/ folder and rush_cards.cdb.
- Detected in 100 indexed script(s).
- Search this function in the Script Explorer with
RushDuel.CreateRaceCannotAttackEffect.
Script Examples
Instant Gift (120306059)
Source: Rush/Scripts/c120306059.lua
lua
end
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateRaceCannotAttackEffect(e,aux.Stringid(m,2),RACE_ALL-RACE_WARRIOR,tp,1,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
endFreshberry Collaboration (120301071)
Source: Rush/Scripts/c120301071.lua
lua
end)
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateRaceCannotAttackEffect(e,aux.Stringid(m,2),RACE_ALL-RACE_AQUA,tp,1,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
endMiracle Pick (120253052)
Source: Rush/Scripts/c120253052.lua
lua
end
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateRaceCannotAttackEffect(e,aux.Stringid(m,1),RACE_ALL-RACE_OMEGAPSYCHO-RACE_PSYCHO,tp,1,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end