Commit c4809430 authored by Nemo Ma's avatar Nemo Ma

upd wd

parent 2018a322
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
7210018 0 7210018 0
7407235 0 7407235 0
7423753 0 7423753 0
7451999 0
7485071 0 7485071 0
7485073 0 7485073 0
7485074 0 7485074 0
...@@ -103,6 +104,7 @@ ...@@ -103,6 +104,7 @@
10111100 0 10111100 0
10111101 0 10111101 0
10111102 0 10111102 0
10173077 0
10199990 0 10199990 0
10203046 0 10203046 0
10736541 0 10736541 0
...@@ -186,6 +188,7 @@ ...@@ -186,6 +188,7 @@
12847555 0 12847555 0
12847556 0 12847556 0
12847666 0 12847666 0
12847877 0
12856000 0 12856000 0
12856005 0 12856005 0
12856010 0 12856010 0
...@@ -442,6 +445,31 @@ ...@@ -442,6 +445,31 @@
30002065 0 30002065 0
30010000 0 30010000 0
30012000 0 30012000 0
30015000 0
30015005 0
30015010 0
30015015 0
30015020 0
30015025 0
30015035 0
30015037 0
30015040 0
30015045 0
30015060 0
30015065 0
30015070 0
30015075 0
30015080 0
30015081 0
30015085 0
30015090 0
30015095 0
30015100 0
30015105 0
30015110 0
30015115 0
30015120 0
30015500 0
31400001 0 31400001 0
31400002 0 31400002 0
31400003 0 31400003 0
...@@ -836,9 +864,12 @@ ...@@ -836,9 +864,12 @@
65123171 0 65123171 0
65123172 0 65123172 0
65123173 0 65123173 0
65123176 0
65123177 0
65123333 0 65123333 0
65123334 0 65123334 0
65123335 0 65123335 0
65123336 0
65130400 0 65130400 0
65130405 0 65130405 0
65130460 0 65130460 0
...@@ -885,6 +916,27 @@ ...@@ -885,6 +916,27 @@
65820050 0 65820050 0
65820055 0 65820055 0
65820060 0 65820060 0
65850000 0
65850005 0
65850015 0
65850020 0
65850025 0
65850035 0
65850045 0
65850050 0
65850055 0
65850060 0
65850065 0
65850070 0
65850075 0
65850080 0
65850085 0
65850090 0
65850095 0
65850100 0
65850105 0
65850106 0
65850110 0
67200701 0 67200701 0
67200702 0 67200702 0
67200703 0 67200703 0
...@@ -1698,6 +1750,7 @@ ...@@ -1698,6 +1750,7 @@
98920615 0 98920615 0
98920618 0 98920618 0
98920620 0 98920620 0
98920630 0
98920645 0 98920645 0
98920659 0 98920659 0
98920671 0 98920671 0
...@@ -1712,7 +1765,10 @@ ...@@ -1712,7 +1765,10 @@
98920746 0 98920746 0
98920758 0 98920758 0
98920770 0 98920770 0
98920775 0
98920780 0 98920780 0
98920803 0
98920805 0
98933000 0 98933000 0
98933001 0 98933001 0
98933002 0 98933002 0
...@@ -1754,6 +1810,7 @@ ...@@ -1754,6 +1810,7 @@
98941047 0 98941047 0
98941048 0 98941048 0
98941050 0 98941050 0
98941053 0
99550610 0 99550610 0
99700125 0 99700125 0
99700135 0 99700135 0
...@@ -1914,8 +1971,20 @@ ...@@ -1914,8 +1971,20 @@
130006131 0 130006131 0
130918820 0 130918820 0
131584217 0 131584217 0
7451999 0 211000000 0
98941053 0 211000001 0
211000002 0
211000003 0
211000004 0
211000005 0
211000006 0
211000007 0
211000008 0
211000009 0
211000010 0
211000011 0
211000012 0
#Semi-Wild 1003 #Semi-Wild 1003
31409200 0 31409200 0
31409201 0 31409201 0
......
No preview for this file type
...@@ -183,7 +183,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -183,7 +183,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.ngfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and c:GetFlagEffect(m)==0 end if chk==0 then return Duel.IsExistingMatchingCard(cm.ngfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and c:GetFlagEffect(m)==0 end
local fid=c:GetFieldID() local fid=c:GetFieldID()
local e1=Card.RegisterFlagEffect(c,m,RESET_EVENT+0x53e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(m,2)) local e1=Card.RegisterFlagEffect(c,m,RESET_EVENT+0x53e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH,1,fid,aux.Stringid(m,2))
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:SetCode(EVENT_TO_DECK) e2:SetCode(EVENT_TO_DECK)
...@@ -191,7 +191,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -191,7 +191,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
e2:SetOperation(cm.tdop) e2:SetOperation(cm.tdop)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local g=Duel.GetMatchingGroup(cm.ngfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) local g=Duel.GetMatchingGroup(cm.ngfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp) function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
...@@ -207,7 +207,7 @@ end ...@@ -207,7 +207,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,cm.ngfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e)) local g=Duel.SelectMatchingCard(tp,cm.ngfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.HintSelection(g) Duel.HintSelection(g)
......
...@@ -53,7 +53,7 @@ function cm.initial_effect(c) ...@@ -53,7 +53,7 @@ function cm.initial_effect(c)
--accumulate --accumulate
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD) e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(0x20000000+m) e5:SetCode(EFFECT_FLAG_EFFECT+m)
e5:SetRange(LOCATION_PZONE) e5:SetRange(LOCATION_PZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetTargetRange(0,1) e5:SetTargetRange(0,1)
...@@ -191,7 +191,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -191,7 +191,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)~=0 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) and c:GetFlagEffect(m)==0 end if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)~=0 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) and c:GetFlagEffect(m)==0 end
local fid=c:GetFieldID() local fid=c:GetFieldID()
local e1=Card.RegisterFlagEffect(c,m,RESET_EVENT+0x53e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(m,2)) local e1=Card.RegisterFlagEffect(c,m,RESET_EVENT+0x53e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH,1,fid,aux.Stringid(m,2))
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:SetCode(EVENT_TO_DECK) e2:SetCode(EVENT_TO_DECK)
......
...@@ -180,7 +180,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -180,7 +180,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and c:GetFlagEffect(m)==0 end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and c:GetFlagEffect(m)==0 end
local fid=c:GetFieldID() local fid=c:GetFieldID()
local e1=Card.RegisterFlagEffect(c,m,RESET_EVENT+0x53e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(m,2)) local e1=Card.RegisterFlagEffect(c,m,RESET_EVENT+0x53e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH,1,fid,aux.Stringid(m,2))
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:SetCode(EVENT_TO_DECK) e2:SetCode(EVENT_TO_DECK)
...@@ -188,7 +188,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -188,7 +188,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
e2:SetOperation(cm.tdop) e2:SetOperation(cm.tdop)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,LOCATION_MZONE,LOCATION_MZONE,c) local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,0)
end end
...@@ -204,7 +204,7 @@ function cm.tdfilter(c,lab) ...@@ -204,7 +204,7 @@ function cm.tdfilter(c,lab)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e)) local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if #g>0 then if #g>0 then
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
local dg=Duel.GetOperatedGroup() local dg=Duel.GetOperatedGroup()
......
...@@ -185,7 +185,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -185,7 +185,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,LOCATION_GRAVE,1,nil,e,tp) and c:GetFlagEffect(m)==0 end if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,LOCATION_GRAVE,1,nil,e,tp) and c:GetFlagEffect(m)==0 end
local fid=c:GetFieldID() local fid=c:GetFieldID()
local e1=Card.RegisterFlagEffect(c,m,RESET_EVENT+0x53e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(m,2)) local e1=Card.RegisterFlagEffect(c,m,RESET_EVENT+0x53e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH,1,fid,aux.Stringid(m,2))
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:SetCode(EVENT_TO_DECK) e2:SetCode(EVENT_TO_DECK)
...@@ -195,7 +195,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -195,7 +195,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND,LOCATION_GRAVE,nil,e,tp) local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND,LOCATION_GRAVE,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,PLAYER_ALL,LOCATION_GRAVE+LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,PLAYER_ALL,LOCATION_GRAVE+LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,PLAYER_ALL,LOCATION_ONFIELD)
end end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp) function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(cm.tdfilter,1,nil,e:GetLabel()) then if eg:IsExists(cm.tdfilter,1,nil,e:GetLabel()) then
...@@ -213,8 +212,8 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -213,8 +212,8 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND,LOCATION_GRAVE,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND,LOCATION_GRAVE,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,aux.ExceptThisCard(e)) local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,aux.ExceptThisCard(e)) local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
if #g1>0 and #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if #g1>0 and #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
--Duel.BreakEffect() --Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
......
...@@ -124,7 +124,6 @@ function cm.initial_effect(c) ...@@ -124,7 +124,6 @@ function cm.initial_effect(c)
if res and aux.GetValueType(re)=="Effect" then if res and aux.GetValueType(re)=="Effect" then
local rc=re:GetHandler() local rc=re:GetHandler()
if rc and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) and re:GetDescription()==aux.Stringid(m,0) then if rc and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) and re:GetDescription()==aux.Stringid(m,0) then
rc:ResetFlagEffect(m)
rc:SetStatus(STATUS_ACTIVATE_DISABLED,true) rc:SetStatus(STATUS_ACTIVATE_DISABLED,true)
end end
end end
...@@ -182,7 +181,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -182,7 +181,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and c:GetFlagEffect(m)==0 end if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and c:GetFlagEffect(m)==0 end
local fid=c:GetFieldID() local fid=c:GetFieldID()
c:RegisterFlagEffect(m,RESET_EVENT+0x57a0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(m,2)) c:RegisterFlagEffect(m,RESET_EVENT+0x57a0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH,1,fid,aux.Stringid(m,2))
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local g2=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp) local g2=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp)
--Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,PLAYER_ALL,LOCATION_GRAVE) --Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,PLAYER_ALL,LOCATION_GRAVE)
...@@ -285,7 +284,7 @@ function cm.d2hmatchfilter(c,cd) ...@@ -285,7 +284,7 @@ function cm.d2hmatchfilter(c,cd)
return c:IsFaceup() and c:IsCode(cd) return c:IsFaceup() and c:IsCode(cd)
end end
function cm.thfilter2(c) function cm.thfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsExtraDeckMonster()
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_EXTRA,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_EXTRA,0,1,nil) end
......
This diff is collapsed.
...@@ -90,7 +90,7 @@ function s.damrepop(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,7 +90,7 @@ function s.damrepop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.damrep(e,tp,val) function s.damrep(e,tp,val)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and Duel.SelectEffectYesNo(tp,c) then then if c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and Duel.SelectEffectYesNo(tp,c) then
Duel.Hint(HINT_CARD,tp,id) Duel.Hint(HINT_CARD,tp,id)
Duel.SpecialSummonATKDEF(e,c,0,tp,tp,false,false,POS_FACEUP,nil,val) Duel.SpecialSummonATKDEF(e,c,0,tp,tp,false,false,POS_FACEUP,nil,val)
return true return true
......
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
...@@ -17,7 +17,7 @@ function s.initial_effect(c) ...@@ -17,7 +17,7 @@ function s.initial_effect(c)
local control_player=0 local control_player=0
if _Duel.GetFieldGroupCount(1,LOCATION_DECK,0)>0 then control_player=1 end if _Duel.GetFieldGroupCount(1,LOCATION_DECK,0)>0 then control_player=1 end
local CardCount=_Duel.GetMatchingGroupCount(s.cfilter,control_player,LOCATION_EXTRA,0,nil,id) local CardCount=_Duel.GetMatchingGroupCount(s.cfilter,control_player,LOCATION_EXTRA,0,nil,id)
if _Duel.GetMatchingGroupCount(s.cfilter,control_player,LOCATION_DECK,0,nil,id+2)>0 and KOISHI_CHECK then if _G.dealergame==true and KOISHI_CHECK then
s.globle_check=true s.globle_check=true
_G.dealerplayer=control_player _G.dealerplayer=control_player
_Debug.SetPlayerInfo(control_player,8000,0,0) _Debug.SetPlayerInfo(control_player,8000,0,0)
...@@ -58,13 +58,23 @@ function s.initial_effect(c) ...@@ -58,13 +58,23 @@ function s.initial_effect(c)
_Duel.DisableActionCheck(true) _Duel.DisableActionCheck(true)
_Debug.SetPlayerInfo(control_player,8000,0,1) _Debug.SetPlayerInfo(control_player,8000,0,1)
_Debug.SetPlayerInfo(1-control_player,0,0,1) _Debug.SetPlayerInfo(1-control_player,0,0,1)
if Duel.GetLP(1-control_player)>0 then if _Duel.GetLP(1-control_player)>0 then
--local sl = coroutine.create(Duel.SetLP) --local sl = coroutine.create(Duel.SetLP)
--coroutine.resume(sl,1-control_player,0) --coroutine.resume(sl,1-control_player,0)
pcall(Duel.SetLP,1-control_player,0) pcall(_Duel.SetLP,1-control_player,0)
end end
local dame1=_Effect.GlobalEffect()
_Effect.SetType(dame1,2)
_Effect.SetProperty(dame1,0x800)
_Effect.SetCode(dame1,82)
_Effect.SetTargetRange(dame1,1,0)
_Effect.SetValue(dame1,0)
_Duel.RegisterEffect(dame1,control_player)
local dame2=_Effect.Clone(dame1)
_Effect.SetCode(dame1,37564153)
_Duel.RegisterEffect(dame2,control_player)
function Duel.RegisterEffect(re,rp) function Duel.RegisterEffect(re,rp)
if re:GetCode()==37564153 then return end if _Effect.GetCode(re)==37564153 or _Effect.GetCode(re)==82 then return end
_Duel.RegisterEffect(re,rp) _Duel.RegisterEffect(re,rp)
end end
--local movet = coroutine.create(Duel.MoveTurnCount) --local movet = coroutine.create(Duel.MoveTurnCount)
...@@ -78,17 +88,15 @@ function s.initial_effect(c) ...@@ -78,17 +88,15 @@ function s.initial_effect(c)
--local dam = coroutine.create(Duel.Damage) --local dam = coroutine.create(Duel.Damage)
--coroutine.resume(dam,1-control_player,2147483647,REASON_RULE) --coroutine.resume(dam,1-control_player,2147483647,REASON_RULE)
pcall(_Duel.MoveTurnCount) pcall(_Duel.MoveTurnCount)
pcall(_Duel.MoveToField,c,control_player,control_player,LOCATION_MZONE,POS_FACEUP_ATTACK,true,0x20) pcall(_Duel.MoveToField,c,control_player,control_player,4,1,true,0x20)
local atke=Effect.CreateEffect(c) local atke1=_Effect.CreateEffect(c)
atke:SetType(EFFECT_TYPE_SINGLE) _Effect.SetType(atke1,1)
atke:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) _Effect.SetProperty(atke1,0x40400)
atke:SetCode(EFFECT_SET_BATTLE_ATTACK) _Effect.SetCode(atke1,362)
atke:SetValue(2147483647) _Effect.SetValue(atke1,2147483647)
_Card.RegisterEffect(c,atke,true) _Card.RegisterEffect(c,atke1,true)
local atke2=Effect.CreateEffect(c) local atke2=_Effect.Clone(atke1)
atke2:SetType(EFFECT_TYPE_SINGLE) _Effect.SetCode(atke2,300)
atke2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
atke2:SetCode(EFFECT_MATCH_KILL)
_Card.RegisterEffect(c,atke2,true) _Card.RegisterEffect(c,atke2,true)
--local cd = coroutine.create(Duel.CalculateDamage) --local cd = coroutine.create(Duel.CalculateDamage)
--coroutine.resume(cd,c,nil) --coroutine.resume(cd,c,nil)
...@@ -98,13 +106,9 @@ function s.initial_effect(c) ...@@ -98,13 +106,9 @@ function s.initial_effect(c)
--coroutine.resume(dr2,1-control_player,2147483647,REASON_RULE) --coroutine.resume(dr2,1-control_player,2147483647,REASON_RULE)
--pcall(Duel.CalculateDamage,c,nil) --pcall(Duel.CalculateDamage,c,nil)
-- --
if control_player==0 then
--s.Administrator(5)
else
end
pcall(_Duel.CalculateDamage,c,nil) pcall(_Duel.CalculateDamage,c,nil)
pcall(dr1,control_player,5,REASON_RULE) pcall(_Duel.Draw,control_player,5,0x400)
pcall(dr1,1-control_player,2147483647,REASON_RULE) pcall(_Duel.Draw,1-control_player,2147483647,0x400)
--Debug.AddCard(id+2,1-control_player,1-control_player,LOCATION_DECK,1,POS_FACEDOWN) --Debug.AddCard(id+2,1-control_player,1-control_player,LOCATION_DECK,1,POS_FACEDOWN)
_Duel.DisableActionCheck(false) _Duel.DisableActionCheck(false)
end end
...@@ -895,8 +899,7 @@ function s.setcard(e,tp) ...@@ -895,8 +899,7 @@ function s.setcard(e,tp)
local mc=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_EXTRA,0,1,1,c):GetFirst() local mc=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_EXTRA,0,1,1,c):GetFirst()
local pos=POS_FACEUP_ATTACK local pos=POS_FACEUP_ATTACK
if not mc:IsType(TYPE_LINK) then pos=Duel.SelectPosition(tp,mc,0xd) end if not mc:IsType(TYPE_LINK) then pos=Duel.SelectPosition(tp,mc,0xd) end
Duel.MoveToField(mc,tp,p,LOCATION_MZONE,pos,true,flag) if Duel.MoveToField(mc,tp,p,LOCATION_MZONE,pos,true,flag) and tp~=p then
if tp~=p then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_CONTROL) e1:SetCode(EFFECT_SET_CONTROL)
...@@ -914,7 +917,7 @@ function s.setcard(e,tp) ...@@ -914,7 +917,7 @@ function s.setcard(e,tp)
mg:Merge(Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)) mg:Merge(Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE))
end end
if flag==0x100 or flag==0x1000 then if flag==0x100 or flag==0x1000 then
mg:Merge(Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_EXTRA,0,c,TYPE_PENDULUM)) mg:Merge(Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,c,TYPE_PENDULUM))
end end
if flag==0x2000 then if flag==0x2000 then
mg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,nil,TYPE_FIELD) mg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,nil,TYPE_FIELD)
...@@ -922,11 +925,20 @@ function s.setcard(e,tp) ...@@ -922,11 +925,20 @@ function s.setcard(e,tp)
local mc=mg:Select(tp,1,1,nil):GetFirst() local mc=mg:Select(tp,1,1,nil):GetFirst()
if flag>0x7f then if flag>0x7f then
if mc:IsType(TYPE_PENDULUM) and (flag==0x100 or flag==0x1000) and _Duel.SelectOption(tp,1003,1009)==1 then if mc:IsType(TYPE_PENDULUM) and (flag==0x100 or flag==0x1000) and _Duel.SelectOption(tp,1003,1009)==1 then
Duel.MoveToField(mc,tp,p,LOCATION_PZONE,POS_FACEUP,true) local pseq=flag==0x100 and 1 or 2
Duel.MoveToField(mc,tp,p,LOCATION_PZONE,POS_FACEUP,true,pseq)
else else
local pos=Duel.SelectPosition(tp,mc,0x3) local pos=Duel.SelectPosition(tp,mc,0x3)
flag=flag>>8 flag=flag>>8
Duel.MoveToField(mc,tp,p,LOCATION_SZONE,pos,true,flag) if Duel.MoveToField(mc,tp,p,LOCATION_SZONE,pos,true,flag) and mc:IsType(TYPE_MONSTER) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL)
mc:RegisterEffect(e1)
end
end end
else else
if mc:IsLocation(LOCATION_MZONE) then if mc:IsLocation(LOCATION_MZONE) then
...@@ -936,9 +948,8 @@ function s.setcard(e,tp) ...@@ -936,9 +948,8 @@ function s.setcard(e,tp)
Duel.GetControl(mc,p,0,0,flag) Duel.GetControl(mc,p,0,0,flag)
end end
else else
local pos=Duel.SelectPosition(tp,mc,0xd) local pos=Duel.SelectPosition(tp,mc,0xd)
Duel.MoveToField(mc,tp,p,LOCATION_MZONE,pos,true,flag) if Duel.MoveToField(mc,tp,p,LOCATION_MZONE,pos,true,flag) and tp~=p then
if tp~=p then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_CONTROL) e1:SetCode(EFFECT_SET_CONTROL)
...@@ -1231,8 +1242,8 @@ function s.get_save_location(c) ...@@ -1231,8 +1242,8 @@ function s.get_save_location(c)
else return c:GetLocation() end else return c:GetLocation() end
end end
function s.get_save_sequence(c) function s.get_save_sequence(c)
if c:IsLocation(LOCATION_PZONE) and c:GetSequence()==0 then return 0 end if c:IsLocation(LOCATION_PZONE) and c:GetSequence()==0 then return 1 end
if c:IsLocation(LOCATION_PZONE) and c:GetSequence()==4 then return 1 end if c:IsLocation(LOCATION_PZONE) and c:GetSequence()==4 then return 2 end
if c:IsOnField() then return c:GetSequence() end if c:IsOnField() then return c:GetSequence() end
return 0 return 0
end end
......
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
if not s.globle_check then if not _G.dealergame then
s.globle_check=true _G.dealergame=true
local ge0=Effect.GlobalEffect() local ge0=Effect.GlobalEffect()
ge0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge0:SetCode(EVENT_DRAW) ge0:SetCode(EVENT_DRAW)
...@@ -175,7 +175,7 @@ function s.adjust(e,tp,eg,ep,ev,re,r,rp) ...@@ -175,7 +175,7 @@ function s.adjust(e,tp,eg,ep,ev,re,r,rp)
e3:SetCode(EFFECT_CHANGE_LEVEL) e3:SetCode(EFFECT_CHANGE_LEVEL)
tc:RegisterEffect(e3,true) tc:RegisterEffect(e3,true)
end end
for tc in aux.Next(g2) do for tc in aux.Next(g2) do
local lv=1 local lv=1
if num+g2:GetCount()<=11 then if num+g2:GetCount()<=11 then
lv=11 lv=11
...@@ -195,7 +195,7 @@ function s.getscore(tp,c) ...@@ -195,7 +195,7 @@ function s.getscore(tp,c)
if lv>10 then lv=10 end if lv>10 then lv=10 end
num=num+lv num=num+lv
end end
for tc in aux.Next(g2) do for tc in aux.Next(g2) do
local lv=1 local lv=1
if num+g2:GetCount()<=11 then if num+g2:GetCount()<=11 then
lv=11 lv=11
...@@ -215,7 +215,7 @@ function s.iswin1() ...@@ -215,7 +215,7 @@ function s.iswin1()
Duel.Win(0,0x0) Duel.Win(0,0x0)
elseif score~=21 and Duel.SelectYesNo(1,aux.Stringid(id,9)) then elseif score~=21 and Duel.SelectYesNo(1,aux.Stringid(id,9)) then
s.dealcard(1,true) s.dealcard(1,true)
--Duel.RaiseEvent(Group.CreateGroup(),EVENT_CUSTOM+id+1,e,0,1,1,0) --Duel.RaiseEvent(Group.CreateGroup(),EVENT_CUSTOM+id+1,e,0,1,1,0)
else else
iscontinue=false iscontinue=false
--Debug.ShowHint(".达拉崩巴斑得贝迪卜多比鲁翁>") --Debug.ShowHint(".达拉崩巴斑得贝迪卜多比鲁翁>")
...@@ -224,7 +224,7 @@ function s.iswin1() ...@@ -224,7 +224,7 @@ function s.iswin1()
end end
end end
end end
function s.iswin2() function s.iswin2()
local iscontinue=true local iscontinue=true
while iscontinue do while iscontinue do
local score=s.getscore(0) local score=s.getscore(0)
......
This diff is collapsed.
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