Commit aaf388cc authored by VanillaSalt's avatar VanillaSalt

fix script

parent f953f1a6
...@@ -3,7 +3,7 @@ function c10236520.initial_effect(c) ...@@ -3,7 +3,7 @@ function c10236520.initial_effect(c)
--handes --handes
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10236520,0)) e1:SetDescription(aux.Stringid(10236520,0))
e1:SetCategory(CATEGORY_TODECK) e1:SetCategory(CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DAMAGE) e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(c10236520.condition) e1:SetCondition(c10236520.condition)
...@@ -16,11 +16,11 @@ function c10236520.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,11 +16,11 @@ function c10236520.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c10236520.target(e,tp,eg,ep,ev,re,r,rp,chk) function c10236520.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,1-tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,2)
end end
function c10236520.operation(e,tp,eg,ep,ev,re,r,rp) function c10236520.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0,nil) local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0)
if g:GetCount()==0 then return end if g:GetCount()<5 then return end
local sg=g:RandomSelect(1-tp,2) local sg=g:RandomSelect(1-tp,2)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
end end
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c10537981.initial_effect(c) function c10537981.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TODECK)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -22,7 +22,7 @@ end ...@@ -22,7 +22,7 @@ end
function c10537981.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c10537981.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c10537981.filter(chkc,Duel.GetTurnCount()) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c10537981.filter(chkc,Duel.GetTurnCount()) end
if chk==0 then return Duel.IsExistingTarget(c10537981.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,Duel.GetTurnCount()) end if chk==0 then return Duel.IsExistingTarget(c10537981.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,Duel.GetTurnCount()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c10537981.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,3,nil,Duel.GetTurnCount()) local g=Duel.SelectTarget(tp,c10537981.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,3,nil,Duel.GetTurnCount())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end end
......
--はぐれ者傭兵部隊 --はぐれ者傭兵部隊
function c17836042.initial_effect(c) function c12836042.initial_effect(c)
--control --control
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17836042,0)) e1:SetDescription(aux.Stringid(12836042,0))
e1:SetCategory(CATEGORY_CONTROL) e1:SetCategory(CATEGORY_CONTROL)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c17836042.condition) e1:SetCondition(c12836042.condition)
e1:SetCost(c17836042.cost) e1:SetCost(c12836042.cost)
e1:SetTarget(c17836042.target) e1:SetTarget(c12836042.target)
e1:SetOperation(c17836042.operation) e1:SetOperation(c12836042.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c17836042.condition(e,tp,eg,ep,ev,re,r,rp) function c12836042.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1 return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1
end end
function c17836042.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c12836042.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1
and not Duel.CheckSpecialSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp)
and e:GetHandler():IsReleasable() end and e:GetHandler():IsReleasable() end
...@@ -32,14 +32,14 @@ function c17836042.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,14 +32,14 @@ function c17836042.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c17836042.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c12836042.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end
if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end end
function c17836042.operation(e,tp,eg,ep,ev,re,r,rp) function c12836042.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
......
...@@ -40,8 +40,9 @@ function c13959634.filter(c,e,tp) ...@@ -40,8 +40,9 @@ function c13959634.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13959634.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) function c13959634.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.GetFlagEffect(tp,13959634)==0 end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,2) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,2)
Duel.RegisterFlagEffect(tp,13959634,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end end
function c13959634.hdop(e,tp,eg,ep,ev,re,r,rp) function c13959634.hdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,2) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,2)
......
...@@ -10,20 +10,21 @@ function c16255442.initial_effect(c) ...@@ -10,20 +10,21 @@ function c16255442.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c16255442.filter(c) function c16255442.filter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand(c) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand()
end end
function c16255442.target(e,tp,eg,ep,ev,re,r,rp,chk) function c16255442.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local hd=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0,e:GetHandler()) local hd=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if e:GetHandler():IsLocation(LOCATION_HAND) then hd=hd-1 end
return hd>0 and Duel.IsExistingMatchingCard(c16255442.filter,tp,LOCATION_GRAVE,0,hd,nil) return hd>0 and Duel.IsExistingMatchingCard(c16255442.filter,tp,LOCATION_GRAVE,0,hd,nil)
end end
local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0,nil) local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local tg=Duel.GetMatchingGroup(c16255442.filter,tp,LOCATION_GRAVE,0,nil) local tg=Duel.GetMatchingGroup(c16255442.filter,tp,LOCATION_GRAVE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_HANDES,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_HANDES,sg,sg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,sg:GetCount(),tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,sg:GetCount(),0,0)
end end
function c16255442.operation(e,tp,eg,ep,ev,re,r,rp) function c16255442.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0,nil) local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local sct=sg:GetCount() local sct=sg:GetCount()
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
local tg=Duel.GetMatchingGroup(c16255442.filter,tp,LOCATION_GRAVE,0,nil) local tg=Duel.GetMatchingGroup(c16255442.filter,tp,LOCATION_GRAVE,0,nil)
......
...@@ -18,9 +18,9 @@ end ...@@ -18,9 +18,9 @@ end
function c20210570.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c20210570.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c20210570.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c20210570.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c20210570.filter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c20210570.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c20210570.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c20210570.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end end
function c20210570.operation(e,tp,eg,ep,ev,re,r,rp) function c20210570.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -14,7 +14,7 @@ function c21954587.initial_effect(c) ...@@ -14,7 +14,7 @@ function c21954587.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(21954587,1)) e2:SetDescription(aux.Stringid(21954587,1))
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c21954587.thcon) e2:SetCondition(c21954587.thcon)
e2:SetTarget(c21954587.thtg) e2:SetTarget(c21954587.thtg)
...@@ -56,7 +56,7 @@ function c21954587.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function c21954587.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end end
function c21954587.thfilter(c) function c21954587.thfilter(c)
return c:IsSetCard(0x74) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0x75) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end end
function c21954587.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c21954587.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21954587.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c21954587.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -33,7 +33,7 @@ function c22666164.filter(c,e,tp) ...@@ -33,7 +33,7 @@ function c22666164.filter(c,e,tp)
end end
function c22666164.target(e,tp,eg,ep,ev,re,r,rp,chk) function c22666164.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3
Duel.IsExistingMatchingCard(c22666164.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c22666164.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end end
function c22666164.operation(e,tp,eg,ep,ev,re,r,rp) function c22666164.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -70,7 +70,7 @@ function c26732909.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,7 +70,7 @@ function c26732909.thop(e,tp,eg,ep,ev,re,r,rp)
local sg1=g1:Select(tp,1,1,nil) local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g2:Select(tp,1,1,nil) local sg2=g2:Select(tp,1,1,nil)
g1:Merge(g2) sg1:Merge(sg2)
Duel.SendtoHand(sg1,nil,REASON_EFFECT) Duel.SendtoHand(sg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1) Duel.ConfirmCards(1-tp,sg1)
end end
......
...@@ -34,7 +34,6 @@ function c30312361.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,7 +34,6 @@ function c30312361.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=1 then return end if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=1 then return end
local code=tc:GetOriginalCode() local code=tc:GetOriginalCode()
local ba=tc:GetBaseAttack() local ba=tc:GetBaseAttack()
local bd=tc:GetBaseDefence()
local reset_flag=RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END local reset_flag=RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END
c:CopyEffect(code, reset_flag, 1) c:CopyEffect(code, reset_flag, 1)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -51,12 +50,5 @@ function c30312361.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,12 +50,5 @@ function c30312361.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_SET_BASE_ATTACK) e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetValue(ba) e2:SetValue(ba)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(reset_flag)
e3:SetCode(EFFECT_SET_BASE_DEFENCE)
e3:SetValue(bd)
c:RegisterEffect(e3)
end end
end end
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c33725271.initial_effect(c) function c33725271.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TODECK)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -14,11 +14,11 @@ function c33725271.filter(c) ...@@ -14,11 +14,11 @@ function c33725271.filter(c)
return c:IsSetCard(0x32) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() return c:IsSetCard(0x32) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end end
function c33725271.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c33725271.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c33725271.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c33725271.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c33725271.filter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c33725271.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c33725271.filter,tp,LOCATION_GRAVE,0,1,3,nil) local g=Duel.SelectTarget(tp,c33725271.filter,tp,LOCATION_GRAVE,0,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end end
function c33725271.activate(e,tp,eg,ep,ev,re,r,rp) function c33725271.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
......
...@@ -4,6 +4,7 @@ function c41482598.initial_effect(c) ...@@ -4,6 +4,7 @@ function c41482598.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c41482598.clear)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--draw --draw
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -46,9 +47,12 @@ function c41482598.drtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -46,9 +47,12 @@ function c41482598.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,0)
end end
function c41482598.drop(e,tp,eg,ep,ev,re,r,rp) function c41482598.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local ht=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) local ht=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
Duel.Draw(tp,4-ht,REASON_EFFECT) if ht<4 then
e:GetLabelObject():SetLabel(4-ht) Duel.Draw(tp,4-ht,REASON_EFFECT)
e:GetLabelObject():SetLabel(4-ht)
else e:GetLabelObject():SetLabel(0) end
end end
function c41482598.dccon(e,tp,eg,ep,ev,re,r,rp) function c41482598.dccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetLabelObject():GetLabel()~=0 return Duel.GetTurnPlayer()==tp and e:GetLabelObject():GetLabel()~=0
...@@ -61,6 +65,7 @@ function c41482598.dctg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -61,6 +65,7 @@ function c41482598.dctg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,e:GetLabel()) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,e:GetLabel())
end end
function c41482598.dcop(e,tp,eg,ep,ev,re,r,rp) function c41482598.dcop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local sg=g:RandomSelect(tp,e:GetLabel()) local sg=g:RandomSelect(tp,e:GetLabel())
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
......
...@@ -8,6 +8,7 @@ function c50491121.initial_effect(c) ...@@ -8,6 +8,7 @@ function c50491121.initial_effect(c)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCountLimit(1)
e1:SetCondition(c50491121.atkcon) e1:SetCondition(c50491121.atkcon)
e1:SetTarget(c50491121.atktg) e1:SetTarget(c50491121.atktg)
e1:SetOperation(c50491121.atkop) e1:SetOperation(c50491121.atkop)
......
...@@ -25,7 +25,7 @@ function c58471134.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,7 +25,7 @@ function c58471134.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterFlagEffect(tp,58471134,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) Duel.RegisterFlagEffect(tp,58471134,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end end
function c58471134.filter(c) function c58471134.filter(c)
return c:IsLevelBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand() return c:GetLevel()==3 and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand()
end end
function c58471134.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c58471134.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c58471134.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c58471134.filter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c69091732.initial_effect(c) function c69091732.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK) e1:SetCategory(CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetHintTiming(0,TIMING_TOHAND) e1:SetHintTiming(0,TIMING_TOHAND)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......
...@@ -16,14 +16,14 @@ function c69257165.ctffilter(c,lv) ...@@ -16,14 +16,14 @@ function c69257165.ctffilter(c,lv)
end end
function c69257165.ctfilter(c,tp) function c69257165.ctfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsDiscardable() return c:IsType(TYPE_MONSTER) and c:IsDiscardable()
and Duel.IsExistingMatchingCard(c69257165.ctffilter,tp,0,LOCATION_MZONE,1,nil,c:GetLevel()) and Duel.IsExistingTarget(c69257165.ctffilter,tp,0,LOCATION_MZONE,1,nil,c:GetLevel())
end end
function c69257165.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c69257165.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100) e:SetLabel(100)
return true return true
end end
function c69257165.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c69257165.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c69257165.ctffilter(e,e:GetLabel()) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c69257165.ctffilter(chkc,e:GetLabel()) end
if chk==0 then if chk==0 then
if e:GetLabel()~=100 then return false end if e:GetLabel()~=100 then return false end
e:SetLabel(0) e:SetLabel(0)
...@@ -33,7 +33,7 @@ function c69257165.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -33,7 +33,7 @@ function c69257165.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local sg=Duel.SelectMatchingCard(tp,c69257165.ctfilter,tp,LOCATION_HAND,0,1,1,nil,tp) local sg=Duel.SelectMatchingCard(tp,c69257165.ctfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
local lv=sg:GetFirst():GetLevel() local lv=sg:GetFirst():GetLevel()
e:SetLabel(lv) e:SetLabel(lv)
Duel.SendtoGrave(sg,REASON_COST) Duel.SendtoGrave(sg,REASON_COST+REASON_DISCARD)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c69257165.ctffilter,tp,0,LOCATION_MZONE,1,1,nil,lv) local g=Duel.SelectTarget(tp,c69257165.ctffilter,tp,0,LOCATION_MZONE,1,1,nil,lv)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
......
...@@ -22,7 +22,7 @@ function c73178098.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,7 +22,7 @@ function c73178098.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
e1:SetValue(1000) e1:SetValue(1000)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
......
...@@ -16,9 +16,9 @@ end ...@@ -16,9 +16,9 @@ end
function c81985784.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c81985784.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c81985784.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c81985784.filter(chkc) end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c81985784.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c81985784.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end end
function c81985784.operation(e,tp,eg,ep,ev,re,r,rp) function c81985784.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -67,7 +67,7 @@ function c94573223.spfilter(c,e,tp) ...@@ -67,7 +67,7 @@ function c94573223.spfilter(c,e,tp)
return c:IsSetCard(0x56) and c:GetCode()~=94573223 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x56) and c:GetCode()~=94573223 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c94573223.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c94573223.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c94573223.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c94573223.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetFlagEffect(tp,94573223)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetFlagEffect(tp,94573223)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c94573223.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c94573223.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -23,7 +23,7 @@ function c94878265.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -23,7 +23,7 @@ function c94878265.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c94878265.filter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c94878265.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c94878265.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c94878265.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end end
function c94878265.operation(e,tp,eg,ep,ev,re,r,rp) function c94878265.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
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