Commit ca90afae authored by Nemo Ma's avatar Nemo Ma

fix+upd

parent 0cf9fdbf
...@@ -789,6 +789,14 @@ ...@@ -789,6 +789,14 @@
30002065 0 30002065 0
30010000 0 30010000 0
30012000 0 30012000 0
#220108
15000180 0
33700902 0
72100115 0
14010257 1
35399020 1
33720007 1
60159912 2
#220102 #220102
35300301 0 35300301 0
35300305 0 35300305 0
......
...@@ -101,7 +101,7 @@ function cm.trop(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,7 +101,7 @@ function cm.trop(e,tp,eg,ep,ev,re,r,rp)
for i=1,ft do for i=1,ft do
local tc=og:Select(tp,1,1,nil):GetFirst() local tc=og:Select(tp,1,1,nil):GetFirst()
og:RemoveCard(tc) og:RemoveCard(tc)
if Duel.Equip(tp,tc,rc,false) then if Duel.Equip(tp,tc,rc,false,true) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
...@@ -111,5 +111,6 @@ function cm.trop(e,tp,eg,ep,ev,re,r,rp) ...@@ -111,5 +111,6 @@ function cm.trop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
Duel.EquipComplete()
end end
end end
\ No newline at end of file
...@@ -133,7 +133,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -133,7 +133,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local ht=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) local ht=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local ht1=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) local ht1=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if ht<ht1 then if ht<ht1 then
Duel.Draw(p,ht1-ht,REASON_EFFECT) Duel.Draw(tp,ht1-ht,REASON_EFFECT)
end end
broken=true broken=true
end end
......
...@@ -158,6 +158,9 @@ end ...@@ -158,6 +158,9 @@ end
function cm.filter(c) function cm.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove()
end end
function cm.setfilter3(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function cm.disable(e,c) function cm.disable(e,c)
return c:GetFieldID()~=e:GetLabel() and (not c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT)) return c:GetFieldID()~=e:GetLabel() and (not c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT))
end end
......
...@@ -87,7 +87,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,7 +87,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
broken=true broken=true
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,1}},obj) and (sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WIND)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WATER)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_EARTH)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_FIRE))>=1 then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,1}},obj) and (tama.tamas_getElementCount(obj,TAMA_ELEMENT_WIND)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_WATER)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_EARTH)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_FIRE))>=1 then
if broken then Duel.BreakEffect() end if broken then Duel.BreakEffect() end
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
broken=true broken=true
......
...@@ -87,7 +87,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,7 +87,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
broken=true broken=true
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,1}},obj) and (sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WIND)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WATER)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_EARTH)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_FIRE))>=1 then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,1}},obj) and (tama.tamas_getElementCount(obj,TAMA_ELEMENT_WIND)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_WATER)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_EARTH)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_FIRE))>=1 then
if broken then Duel.BreakEffect() end if broken then Duel.BreakEffect() end
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
broken=true broken=true
......
...@@ -24,7 +24,7 @@ function cm.initial_effect(c) ...@@ -24,7 +24,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST) e1:SetCode(EVENT_ADJUST)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e1:SetCondition(cm.ctcon) e1:SetCondition(cm.ctcon)
e1:SetOperation(cm.ctop) e1:SetOperation(cm.ctop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -135,14 +135,15 @@ function cm.RkXyzOperation(alterf,desc,op) ...@@ -135,14 +135,15 @@ function cm.RkXyzOperation(alterf,desc,op)
end end
end end
function cm.ctcon(e,tp,eg,ep,ev,re,r,rp) function cm.ctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_MZONE) and not e:GetHandler():IsPreviousLocation(LOCATION_MZONE) return e:GetHandler():IsLocation(LOCATION_MZONE) and not e:GetHandler():IsPreviousLocation(LOCATION_MZONE) and e:GetHandler():GetFlagEffect(15000185)==0
end end
function cm.ct2con(e,tp,eg,ep,ev,re,r,rp) function cm.ct2con(e,tp,eg,ep,ev,re,r,rp)
return true return e:GetHandler():GetFlagEffect(15000185)==0
end end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp) function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
c:AddCounter(0xf3,12) c:AddCounter(0xf3,12)
c:RegisterFlagEffect(15000185,RESET_EVENT+RESETS_STANDARD,0,1)
end end
function cm.defilter(c) function cm.defilter(c)
return c:IsCode(15000183) and c:IsFaceup() return c:IsCode(15000183) and c:IsFaceup()
......
...@@ -30,6 +30,10 @@ function cm.op(e,tp) ...@@ -30,6 +30,10 @@ function cm.op(e,tp)
EFFECT_DISABLE_FIELD = 0 EFFECT_DISABLE_FIELD = 0
EFFECT_USE_EXTRA_MZONE = 0 EFFECT_USE_EXTRA_MZONE = 0
EFFECT_USE_EXTRA_SZONE = 0 EFFECT_USE_EXTRA_SZONE = 0
for tc in aux.Next(Duel.GetMatchingGroup(nil,tp,0x1ff,0x1ff,nil)) do
local code=tc:GetOriginalCode()
Card.ReplaceEffect(tc,code,nil)
end
function Duel.SetChainLimit(...) function Duel.SetChainLimit(...)
return return
end end
......
...@@ -7,7 +7,7 @@ function c33200501.initial_effect(c) ...@@ -7,7 +7,7 @@ function c33200501.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DESTROYED) e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,33200501) e1:SetCountLimit(1,33200501)
e1:SetCondition(c33200501.spcon) e1:SetCondition(c33200501.spcon)
...@@ -16,7 +16,7 @@ function c33200501.initial_effect(c) ...@@ -16,7 +16,7 @@ function c33200501.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33200501,1)) e2:SetDescription(aux.Stringid(33200501,1))
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
......
...@@ -16,7 +16,7 @@ function cm.initial_effect(c) ...@@ -16,7 +16,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3) GetMZoneCount c:RegisterEffect(e3)
local e4=e2:Clone() local e4=e2:Clone()
e4:SetCode(EVENT_MSET) e4:SetCode(EVENT_MSET)
c:RegisterEffect(e4) c:RegisterEffect(e4)
...@@ -25,7 +25,7 @@ function cm.initial_effect(c) ...@@ -25,7 +25,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e6=e2:Clone() local e6=e2:Clone()
e6:SetCode(EVENT_CHANGE_POS) e6:SetCode(EVENT_CHANGE_POS)
e6:SetCondition(cm.con) e6:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return eg:IsExists(Card.IsFacedown,1,nil)end)
c:RegisterEffect(e6) c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c) local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -43,9 +43,6 @@ function cm.initial_effect(c) ...@@ -43,9 +43,6 @@ function cm.initial_effect(c)
e9:SetOperation(cm.operation3) e9:SetOperation(cm.operation3)
c:RegisterEffect(e9) c:RegisterEffect(e9)
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsFacedown,1,nil)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g1=Group.CreateGroup() local g1=Group.CreateGroup()
local g2=Group.CreateGroup() local g2=Group.CreateGroup()
...@@ -73,7 +70,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,7 +70,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if ac==label then if ac==label then
c:RegisterFlagEffect(m+d+250,RESET_EVENT+RESETS_STANDARD,0,0,ac) c:RegisterFlagEffect(m+d+250,RESET_EVENT+RESETS_STANDARD,0,0,ac)
local cg=Duel.GetFieldGroup(tp,0,0xe) local cg=Duel.GetFieldGroup(tp,0,0xe)
if c:GetFlagEffect(m+d+250)==10 and #cg>0 then Duel.RaiseEvent(cg,EVENT_CUSTOM+(m+333),re,r,rp,d/500,ac) end if c:GetFlagEffect(m+d+250)==10 and #cg>0 then Duel.RaiseEvent(cg,EVENT_CUSTOM+(m+333),re,r,rp,tp,ac) end
else else
if c:GetFlagEffect(m+d+250)<10 then Duel.SetLP(tp,Duel.GetLP(tp)-800) end if c:GetFlagEffect(m+d+250)<10 then Duel.SetLP(tp,Duel.GetLP(tp)-800) end
c:ResetFlagEffect(m+d+250) c:ResetFlagEffect(m+d+250)
...@@ -81,17 +78,19 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,17 +78,19 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
local dg=Duel.GetFieldGroup(tp,0xe,0xe) local dg=Duel.GetFieldGroup(tp,0xe,0xe)
if c:GetFlagEffect(m+d)==100 and #dg>0 then Duel.RaiseEvent(dg,EVENT_CUSTOM+(m+666),re,r,rp,d/500,0) end if c:GetFlagEffect(m+d)==100 and #dg>0 then Duel.RaiseEvent(dg,EVENT_CUSTOM+(m+666),re,r,rp,tp,ev) end
end end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp) function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(tp,eg) Duel.Hint(HINT_CARD,0,m)
Duel.ConfirmCards(ep,eg)
local g=eg:Filter(Card.IsCode,nil,ev) local g=eg:Filter(Card.IsCode,nil,ev)
if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_EFFECT) else Duel.SetLP(tp,Duel.GetLP(tp)-2000) end if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_EFFECT) else Duel.SetLP(ep,Duel.GetLP(ep)-2000) end
Duel.ShuffleHand(1-tp) Duel.ShuffleHand(1-ep)
end end
function cm.operation3(e,tp,eg,ep,ev,re,r,rp) function cm.operation3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.SendtoGrave(eg,REASON_EFFECT) Duel.SendtoGrave(eg,REASON_EFFECT)
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE) local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)
if ct>0 then Duel.SetLP(1-tp,Duel.GetLP(1-tp)-ct*1000) end if ct>0 then Duel.SetLP(1-ep,Duel.GetLP(1-ep)-ct*1000) end
end end
...@@ -6,7 +6,7 @@ function c63790400.initial_effect(c) ...@@ -6,7 +6,7 @@ function c63790400.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_NONTUNER) e1:SetCode(EFFECT_NONTUNER)
e1:SetValue(c63790400.tnval) e1:SetValue(c63790400.ntval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -34,7 +34,7 @@ function c63790400.initial_effect(c) ...@@ -34,7 +34,7 @@ function c63790400.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c63790400.cfilter(c) function c63790400.cfilter(c)
return c:IsFaceup() and (c:IsRace(RACE_PLANT) or c:IsRace(RACE_DRAGON)) return c:IsFaceup() and c:IsSetCard(0x123)
end end
function c63790400.spcon(e,tp,eg,ep,ev,re,r,rp) function c63790400.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or Duel.IsExistingMatchingCard(c63790400.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or Duel.IsExistingMatchingCard(c63790400.cfilter,tp,LOCATION_MZONE,0,1,nil)
...@@ -98,4 +98,7 @@ function c63790400.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -98,4 +98,7 @@ function c63790400.tgop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
\ No newline at end of file function c63790400.ntval(e,c)
return e:GetHandler():IsControler(c:GetControler()) and (c:IsRace(RACE_PLANT) or c:IsRace(RACE_DRAGON))
end
...@@ -15,7 +15,8 @@ function c65010047.initial_effect(c) ...@@ -15,7 +15,8 @@ function c65010047.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(65010047,0)) e3:SetDescription(aux.Stringid(65010047,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
......
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