Card.ReplaceEffect
Signature
lua
Card.ReplaceEffect(Card c, int code, int reset, [int count]) -> intDescription
Replaces c's effects with the effects of card code under the given reset flags and returns the replacement id. count defaults to 1; phase resets automatically include both players' turns when no turn side is specified.
Parameters
cCardcodeintresetintcountintoptional - default: 1
Returns
int
Source
D:\Programs\GitHub\ygopro-core\libcard.cpp:3622
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 2 indexed script(s).
- Search this function in the Script Explorer with
Card.ReplaceEffect.
| Card | ID | Script | Detected Calls |
|---|---|---|---|
| Arcana Call | 99189322 | Scripts/c99189322.lua | 1 |
| Red Supremacy | 50584941 | Scripts/c50584941.lua | 1 |
Script Examples
Arcana Call (99189322)
Source: Scripts/c99189322.lua
lua
if Duel.Remove(regc,POS_FACEUP,REASON_EFFECT)==0 or not regc:IsLocation(LOCATION_REMOVED) then return end
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetFlagEffect(FLAG_ID_REVERSAL_OF_FATE)~=0 and tc:GetFlagEffect(FLAG_ID_ARCANA_COIN)~=0 then
local cid=tc:ReplaceEffect(regc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterFlagEffect(99189322,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(e:GetHandler())Red Supremacy (50584941)
Source: Scripts/c50584941.lua
lua
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc:ReplaceEffect(code,RESET_EVENT+RESETS_STANDARD)
end
end