Commit 65eed76b authored by Nemo Ma's avatar Nemo Ma

fix

parent 4870d517
...@@ -74,7 +74,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,7 +74,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(mat1) Duel.HintSelection(mat1)
Duel.ConfirmCards(1-tp,mat1) Duel.ConfirmCards(1-tp,mat1)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
Duel.ShuffleHand() Duel.ShuffleHand(tp)
else else
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
end end
......
--未完成伊吕波 --未完成伊吕波
function c65130303.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_ADJUST) e1:SetCode(EVENT_ADJUST)
e1:SetCondition(c65130303.copycon) e1:SetCondition(s.changecon)
e1:SetOperation(c65130303.copyop) e1:SetOperation(s.changeop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e5=e1:Clone() local e5=e1:Clone()
e5:SetCode(EVENT_CUSTOM+65130303) e5:SetCode(EVENT_CUSTOM+id)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
local KOISHI_CHECK=false local KOISHI_CHECK=false
if Card.SetCardData then KOISHI_CHECK=true end if Card.SetCardData then KOISHI_CHECK=true end
function c65130303.cfilter(c) function s.cfilter(c)
return c:GetOriginalCodeRule()==65130303 and c:IsFaceup() return c:GetOriginalCode()==id and c:IsFaceup() and not c:IsDisabled()
end end
function c65130303.cfilter2(c,zone1,e) function s.zfilter1(c,zone1,e)
local zone2=1<<c:GetSequence() local zone2=1<<c:GetSequence()
return not c:IsOriginalCodeRule(65130303) and c:GetFlagEffect(65130303)==0 and c:GetFlagEffect(65130333)==0 and zone1==zone2|zone1 and c:IsFaceup() and not c:IsImmuneToEffect(e) return c:GetOriginalCode()~=id and c:GetFlagEffect(id)==0 and c:GetFlagEffect(65130333)==0 and zone1==zone2|zone1 and c:IsFaceup() and not c:IsImmuneToEffect(e)
end end
function c65130303.cfilter3(c,zc,e) function s.zfilter2(c,zc,e)
return not c:IsOriginalCodeRule(65130303) and c:GetFlagEffect(65130303)==0 and c:GetFlagEffect(65130333)==0 and c:GetColumnGroup():IsContains(zc) and c:IsFaceup() and not c:IsImmuneToEffect(e) return c:GetOriginalCode()~=id and c:GetFlagEffect(id)==0 and c:GetFlagEffect(65130333)==0 and c:GetColumnGroup():IsContains(zc) and c:IsFaceup() and not c:IsImmuneToEffect(e)
end end
function c65130303.copycon(e,tp,eg,ep,ev,re,r,rp) function s.changecon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local zone=0 local zone=0
local seq=c:GetSequence() local seq=c:GetSequence()
if seq>0 and seq<5 then zone=zone|(1<<(seq-1)) end if seq>0 and seq<5 then zone=zone|(1<<(seq-1)) end
if seq<4 then zone=zone|(1<<(seq+1)) end if seq<4 then zone=zone|(1<<(seq+1)) end
return Duel.IsExistingMatchingCard(c65130303.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and (Duel.IsExistingMatchingCard(c65130303.cfilter2,tp,LOCATION_MZONE,0,1,c,zone,e) or and (Duel.IsExistingMatchingCard(s.zfilter1,tp,LOCATION_MZONE,0,1,c,zone,e) or
Duel.IsExistingMatchingCard(c65130303.cfilter3,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,e)) Duel.IsExistingMatchingCard(s.zfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,e))
end end
function c65130303.ncopycon0(e,tp,eg,ep,ev,re,r,rp) function s.unchangecon0(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetFlagEffect(65130303)~=0 return c:GetFlagEffect(id)~=0
end end
function c65130303.ncopycon(e,tp,eg,ep,ev,re,r,rp) function s.unchangecon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return not Duel.IsExistingMatchingCard(c65130303.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and c:GetFlagEffect(65130303)~=0 return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and c:GetFlagEffect(id)~=0
end end
function c65130303.ncfilter2(c,zone1) function s.unzfilter1(c,zone1)
local zone2=1<<c:GetSequence() local zone2=1<<c:GetSequence()
return (c:IsOriginalCodeRule(65130303) or c:GetFlagEffect(65130303)~=0) and zone1==zone2|zone1 return (c:GetOriginalCode()==id or c:GetFlagEffect(id)~=0) and not c:IsDisabled() and zone1==zone2|zone1
end end
function c65130303.ncfilter3(c,zc) function s.unzfilter2(c,zc)
return (c:IsOriginalCodeRule(65130303) or c:GetFlagEffect(65130303)~=0) and c:GetColumnGroup():IsContains(zc) return (c:GetOriginalCode()==id or c:GetFlagEffect(id)~=0) and not c:IsDisabled() and c:GetColumnGroup():IsContains(zc)
end end
function c65130303.ncopycon2(e,tp,eg,ep,ev,re,r,rp) function s.unchangecon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local zone=0 local zone=0
local seq=c:GetSequence() local seq=c:GetSequence()
if seq>0 and seq<5 then zone=zone|(1<<(seq-1)) end if seq>0 and seq<5 then zone=zone|(1<<(seq-1)) end
if seq<4 then zone=zone|(1<<(seq+1)) end if seq<4 then zone=zone|(1<<(seq+1)) end
return not Duel.IsExistingMatchingCard(c65130303.ncfilter2,tp,LOCATION_MZONE,0,1,c,zone) and not Duel.IsExistingMatchingCard(c65130303.ncfilter3,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c) and c:GetFlagEffect(65130303)~=0 end return not Duel.IsExistingMatchingCard(s.unzfilter1,tp,LOCATION_MZONE,0,1,nil,zone) and not Duel.IsExistingMatchingCard(s.unzfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c) and c:GetFlagEffect(id)~=0 end
function c65130303.copyop(e,tp,eg,ep,ev,re,r,rp) function s.changeop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsImmuneToEffect(e) then return end if c:IsImmuneToEffect(e) then return end
local zone=0 local zone=0
local seq=c:GetSequence() local seq=c:GetSequence()
if seq>0 and seq<5 then zone=zone|(1<<(seq-1)) end if seq>0 and seq<5 then zone=zone|(1<<(seq-1)) end
if seq<4 then zone=zone|(1<<(seq+1)) end if seq<4 then zone=zone|(1<<(seq+1)) end
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0):Filter(c65130303.cfilter2,c,zone,e) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0):Filter(s.zfilter1,c,zone,e)
local tg=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE):Filter(c65130303.cfilter3,c,c,e) local tg=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE):Filter(s.zfilter2,c,c,e)
tg=Group.__add(tg,g) tg=Group.__add(tg,g)
if tg then if tg then
for tc in aux.Next(tg) do for tc in aux.Next(tg) do
...@@ -73,150 +74,62 @@ function c65130303.copyop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,150 +74,62 @@ function c65130303.copyop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_CODE) e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(65130304) e1:SetValue(id+1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
--no iroha --no iroha
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_ONFIELD) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_LEAVE_FIELD) e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCondition(c65130303.ncopycon) e2:SetCondition(s.unchangecon)
e2:SetOperation(c65130303.ncopyop) e2:SetOperation(s.unchangeop)
e2:SetLabel(cid) e2:SetLabel(cid)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
--leave --leave
local e3=Effect.CreateEffect(c) local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_LEAVE_FIELD_P) e3:SetCode(EVENT_LEAVE_FIELD_P)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return e:GetHandler():GetFlagEffect(id)~=0 end)
e3:SetLabel(cid)
e3:SetCondition(c65130303.ncopycon0)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetOperation(c65130303.ncopyop)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
--move --move
local e4=Effect.CreateEffect(c) local e4=e2:Clone()
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_MOVE) e4:SetCode(EVENT_MOVE)
e4:SetRange(LOCATION_MZONE) e4:SetCondition(s.unchangecon2)
e4:SetLabel(cid)
e4:SetCondition(c65130303.ncopycon2)
e4:SetOperation(c65130303.ncopyop)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e4) tc:RegisterEffect(e4)
--xyz
--local e5=Effect.CreateEffect(c)
--e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
--e5:SetCode(EVENT_EVENT_BE_MATERIAL)
--e5:SetLabel(cid)
--e5:SetOperation(c65130303.ncopyop)
--tc:RegisterEffect(e5)
--custom --custom
local e6=Effect.CreateEffect(c) local e6=e2:Clone()
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e6:SetCode(EVENT_CUSTOM+id+1)
e6:SetRange(LOCATION_MZONE) e6:SetCondition(s.unchangecon2)
e6:SetCode(EVENT_CUSTOM+65130304)
e6:SetLabel(cid)
e6:SetCondition(c65130303.ncopycon2)
e6:SetOperation(c65130303.ncopyop)
e6:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e6) tc:RegisterEffect(e6)
tc:CopyEffect(65130303,RESET_EVENT+RESETS_STANDARD)
tc:RegisterFlagEffect(65130303,RESET_EVENT+RESETS_STANDARD,0,1) tc:CopyEffect(id,RESET_EVENT+RESETS_STANDARD)
local Type=tc:GetType() tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
--local Lv=tc:GetOriginalLevel()
--local Rk=tc:GetOriginalRank()
local Lv=tc:GetLevel()
local Rk=tc:GetRank()
local Lk=tc:GetLink() local Lk=tc:GetLink()
local Att=tc:GetOriginalAttribute()
local Atk=tc:GetBaseAttack()
local Def=tc:GetBaseDefense()
local Race=tc:GetOriginalRace()
local Lkm =0
if tc:IsType(TYPE_LINK) then
local Lkml = {0x001,0x002,0x004,0x008,0x020,0x040,0x080,0x100}
for k,v in ipairs(Lkml) do
if tc:IsLinkMarker(v) then
Lkm=Lkm+v
end
end
end
if tc:IsType(TYPE_XYZ)then if tc:IsType(TYPE_XYZ)then
Lk=9 Lk=9
end end
if KOISHI_CHECK and Duel.IsExistingMatchingCard(c65130303.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then if KOISHI_CHECK and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then
tc:SetEntityCode(65130304+Lk,true) tc:SetCardData(CARDDATA_CODE,id+1+Lk)
end end
c65130303.baseop(tc,Type,Lv,Rk,Att,Atk,Def,Race) if not tc:IsType(TYPE_EFFECT) then
if KOISHI_CHECK and Lkm~=0 then local e1=Effect.CreateEffect(c)
c65130303.Linkop(tc,Lkm) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_EFFECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end end
end end
Duel.RaiseEvent(c,EVENT_CUSTOM+65130303,re,r,rp,ep,ev) Duel.RaiseEvent(c,EVENT_CUSTOM+id,re,r,rp,ep,ev)
end end
end end
function c65130303.baseop(c,Type,Lv,Rk,Att,Atk,Def,Race) function s.unchangeop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(Atk)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(Def)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(Type)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
if not c:IsType(TYPE_EFFECT) then
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_ADD_TYPE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(TYPE_EFFECT)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e4)
end
local e5=e1:Clone()
e5:SetCode(EFFECT_CHANGE_LEVEL)
e5:SetValue(Lv)
c:RegisterEffect(e5)
local e6=e1:Clone()
e6:SetCode(EFFECT_CHANGE_RANK)
e6:SetValue(Rk)
c:RegisterEffect(e6)
local e7=e1:Clone()
e7:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e7:SetValue(Att)
c:RegisterEffect(e7)
local e8=e1:Clone()
e8:SetCode(EFFECT_CHANGE_RACE)
e8:SetValue(Race)
c:RegisterEffect(e8)
end
function c65130303.Linkop(c,Lkm)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LINK_MARKER_KOISHI)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(Lkm)
c:RegisterEffect(e1)
end
function c65130303.ncopyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
c:ResetFlagEffect(65130303) c:ResetFlagEffect(id)
local code=e:GetLabel() local code=e:GetLabel()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -224,9 +137,9 @@ function c65130303.ncopyop(e,tp,eg,ep,ev,re,r,rp) ...@@ -224,9 +137,9 @@ function c65130303.ncopyop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CHANGE_CODE) e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code) e1:SetValue(code)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if KOISHI_CHECK then if KOISHI_CHECK then
c:SetEntityCode(code,true) c:SetCardData(CARDDATA_CODE,code)
end end
c:ResetEffect(65130303,RESET_COPY) c:ResetEffect(id,RESET_COPY)
Duel.RaiseEvent(c,EVENT_CUSTOM+65130304,re,r,rp,ep,ev) Duel.RaiseEvent(c,EVENT_CUSTOM+id+1,re,r,rp,ep,ev)
end end
\ No newline at end of file
...@@ -19,105 +19,92 @@ function s.initial_effect(c) ...@@ -19,105 +19,92 @@ function s.initial_effect(c)
end end
function aux.IsCodeListed(c,code) function aux.IsCodeListed(c,code)
return false return false
end end
function Duel.Win(p,r)
end
end end
end end
function s.changecode(tc) function s.changecode(tc)
--local cid=tc:GetOriginalCode() --local cid=tc:GetOriginalCode()
local cid=0 local cid=0
local Type=tc:GetOriginalType() local Type=tc:GetOriginalType()
if Type&TYPE_MONSTER>0 then if Type&TYPE_MONSTER>0 then
local Lv=tc:GetOriginalLevel()
local Rk=tc:GetOriginalRank()
local Att=tc:GetOriginalAttribute()
local Atk=tc:GetBaseAttack()
local Def=tc:GetBaseDefense()
local Race=tc:GetOriginalRace()
local Lsc=tc:GetOriginalLeftScale()
local Rsc=tc:GetOriginalRightScale()
local Lkml = {0x001,0x002,0x004,0x008,0x020,0x040,0x080,0x100}
local Lkm =0
for k,v in ipairs(Lkml) do
if tc:IsLinkMarker(v) then
Lkm=Lkm+v
end
end
if Type&TYPE_NORMAL>0 then cid=id+1 end if Type&TYPE_NORMAL>0 then cid=id+1 end
if Type&TYPE_LINK>0 then cid=id+10+tc:GetLink() end -- if Type&TYPE_LINK>0 then cid=id+10+tc:GetLink() end --
if Type&TYPE_SYNCHRO>0 then cid=id+3 end if Type&TYPE_SYNCHRO>0 then cid=id+3 end
if Type&TYPE_XYZ>0 then cid=id+5 end if Type&TYPE_XYZ>0 then cid=id+5 end
if Type&TYPE_RITUAL>0 then cid=id+7 end if Type&TYPE_RITUAL>0 then cid=id+7 end
if Type&TYPE_FUSION>0 then cid=id+9 end if Type&TYPE_FUSION>0 then cid=id+9 end
if Type&TYPE_PENDULUM>0 then cid=cid+1 end if Type&TYPE_PENDULUM>0 then cid=cid+1 end
if cid>id+39 or cid<id+1 then cid=id+1 end if cid>id+39 or cid<id+1 then cid=id+1 end
if Type&TYPE_TOKEN>0 then cid=id+39 end if Type&TYPE_TOKEN>0 then cid=id+39 end
tc:SetEntityCode(cid,true) tc:SetCardData(CARDDATA_CODE,cid)
s.changemonster(tc,Type,Lkm,Lv,Rk,Att,Atk,Def,Race,Lsc,Rsc)
else else
if Type&TYPE_SPELL>0 then if Type&TYPE_SPELL>0 then
tc:SetEntityCode(id+20,true) tc:SetCardData(CARDDATA_CODE,id+20)
if Type&TYPE_QUICKPLAY>0 then tc:SetEntityCode(id+21,true) end if Type&TYPE_QUICKPLAY>0 then tc:SetCardData(CARDDATA_CODE,id+21) end
if Type&TYPE_CONTINUOUS>0 then tc:SetEntityCode(id+22,true) end if Type&TYPE_CONTINUOUS>0 then tc:SetCardData(CARDDATA_CODE,id+22) end
if Type&TYPE_EQUIP>0 then tc:SetEntityCode(id+23,true) end if Type&TYPE_EQUIP>0 then tc:SetCardData(CARDDATA_CODE,id+23) end
if Type&TYPE_FIELD>0 then tc:SetEntityCode(id+24,true) end if Type&TYPE_FIELD>0 then tc:SetCardData(CARDDATA_CODE,id+24) end
if Type&TYPE_RITUAL>0 then tc:SetEntityCode(id+25,true) end if Type&TYPE_RITUAL>0 then tc:SetCardData(CARDDATA_CODE,id+25) end
else else
if Type&TYPE_TRAP>0 then if Type&TYPE_TRAP>0 then
tc:SetEntityCode(id+30,true) tc:SetCardData(CARDDATA_CODE,id+30)
if Type&TYPE_CONTINUOUS>0 then tc:SetEntityCode(id+31,true) end if Type&TYPE_CONTINUOUS>0 then tc:SetCardData(CARDDATA_CODE,id+31) end
if Type&TYPE_COUNTER>0 then tc:SetEntityCode(id+32,true) end if Type&TYPE_COUNTER>0 then tc:SetCardData(CARDDATA_CODE,id+32) end
end end
end end
end end
end end
function s.changemonster(c,Type,Lkm,Lv,Rk,Att,Atk,Def,Race,Lsc,Rsc) --function s.changemonster(c,Type,Lkm,Lv,Rk,Att,Atk,Def,Race,Lsc,Rsc)
local e1=Effect.CreateEffect(c) -- local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) -- e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK) -- e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE) -- e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(0xff) -- e1:SetRange(0xff)
e1:SetValue(Atk) -- e1:SetValue(Atk)
c:RegisterEffect(e1) -- c:RegisterEffect(e1)
local e2=e1:Clone() -- local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE) -- e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(Def) -- e2:SetValue(Def)
c:RegisterEffect(e2) -- c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) -- local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) -- e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_TYPE) -- e3:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE) -- e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(Type) -- e3:SetValue(Type)
e3:SetReset(0) -- e3:SetReset(0)
c:RegisterEffect(e3) -- c:RegisterEffect(e3)
local e4=e1:Clone() -- local e4=e1:Clone()
e4:SetCode(EFFECT_CHANGE_LINK_MARKER_KOISHI) -- e4:SetCode(EFFECT_CHANGE_LINK_MARKER_KOISHI)
e4:SetValue(Lkm) -- e4:SetValue(Lkm)
c:RegisterEffect(e4) -- c:RegisterEffect(e4)
local e5=e1:Clone() -- local e5=e1:Clone()
e5:SetCode(EFFECT_CHANGE_LEVEL) -- e5:SetCode(EFFECT_CHANGE_LEVEL)
e5:SetValue(Lv) -- e5:SetValue(Lv)
c:RegisterEffect(e5) -- c:RegisterEffect(e5)
local e6=e1:Clone() -- local e6=e1:Clone()
e6:SetCode(EFFECT_CHANGE_RANK) -- e6:SetCode(EFFECT_CHANGE_RANK)
e6:SetValue(Rk) -- e6:SetValue(Rk)
c:RegisterEffect(e6) -- c:RegisterEffect(e6)
local e7=e1:Clone() -- local e7=e1:Clone()
e7:SetCode(EFFECT_CHANGE_ATTRIBUTE) -- e7:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e7:SetValue(Att) -- e7:SetValue(Att)
c:RegisterEffect(e7) -- c:RegisterEffect(e7)
local e8=e1:Clone() -- local e8=e1:Clone()
e8:SetCode(EFFECT_CHANGE_RACE) -- e8:SetCode(EFFECT_CHANGE_RACE)
e8:SetValue(Race) -- e8:SetValue(Race)
c:RegisterEffect(e8) -- c:RegisterEffect(e8)
local e9=e1:Clone() -- local e9=e1:Clone()
e9:SetCode(EFFECT_CHANGE_LSCALE) -- e9:SetCode(EFFECT_CHANGE_LSCALE)
e9:SetValue(Lsc) -- e9:SetValue(Lsc)
c:RegisterEffect(e9) -- c:RegisterEffect(e9)
local e10=e1:Clone() -- local e10=e1:Clone()
e10:SetCode(EFFECT_CHANGE_RSCALE) -- e10:SetCode(EFFECT_CHANGE_RSCALE)
e10:SetValue(Rsc) -- e10:SetValue(Rsc)
c:RegisterEffect(e10) -- c:RegisterEffect(e10)
end --end
function s.op(e,tp,eg,ep,ev,re,r,rp) function s.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,tp,id) Duel.Hint(HINT_CARD,tp,id)
Duel.Hint(HINT_CARD,1-tp,id) Duel.Hint(HINT_CARD,1-tp,id)
...@@ -133,7 +120,12 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -133,7 +120,12 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(rg,nil,SEQ_DECKSHUFFLE,REASON_RULE) Duel.SendtoDeck(rg,nil,SEQ_DECKSHUFFLE,REASON_RULE)
end end
function Card.SetEntityCode(c,bool) function Card.SetEntityCode(c,bool)
end
_SetCardData=Card.SetCardData
function Card.SetCardData(c,type,value)
if type==CARDDATA_CODE then return end
_SetCardData(c,type,value)
end end
_Hint=Duel.Hint _Hint=Duel.Hint
function Duel.Hint(ht,p,desc) function Duel.Hint(ht,p,desc)
......
...@@ -33,7 +33,7 @@ function c98920008.slevel(e,c) ...@@ -33,7 +33,7 @@ function c98920008.slevel(e,c)
return 4*65536+lv return 4*65536+lv
end end
function c98920008.cfilter(c) function c98920008.cfilter(c)
return c:IsRace(RACE_REPTILE) and c:IsAbleToGraveAsCost() return c:IsRace(RACE_REPTILE) and c:IsReleasable()
end end
function c98920008.dspcon(e,c) function c98920008.dspcon(e,c)
if c==nil then return true end if c==nil then return true end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment