Commit 5b1399f4 authored by argon.sun's avatar argon.sun

fix

parents 893a597c ca4726cc
......@@ -3,7 +3,7 @@ function c10236520.initial_effect(c)
--handes
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10236520,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetCategory(CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(c10236520.condition)
......@@ -16,11 +16,11 @@ function c10236520.condition(e,tp,eg,ep,ev,re,r,rp)
end
function c10236520.target(e,tp,eg,ep,ev,re,r,rp,chk)
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
function c10236520.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0,nil)
if g:GetCount()==0 then return end
local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0)
if g:GetCount()<5 then return end
local sg=g:RandomSelect(1-tp,2)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
end
......@@ -2,7 +2,7 @@
function c10537981.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetCategory(CATEGORY_TODECK)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......@@ -22,7 +22,7 @@ end
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 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())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
......
--はぐれ者傭兵部隊
function c17836042.initial_effect(c)
function c12836042.initial_effect(c)
--control
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17836042,0))
e1:SetDescription(aux.Stringid(12836042,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c17836042.condition)
e1:SetCost(c17836042.cost)
e1:SetTarget(c17836042.target)
e1:SetOperation(c17836042.operation)
e1:SetCondition(c12836042.condition)
e1:SetCost(c12836042.cost)
e1:SetTarget(c12836042.target)
e1:SetOperation(c12836042.operation)
c:RegisterEffect(e1)
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
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
and not Duel.CheckSpecialSummonActivity(tp)
and e:GetHandler():IsReleasable() end
......@@ -32,14 +32,14 @@ function c17836042.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e2,tp)
Duel.Release(e:GetHandler(),REASON_COST)
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 chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
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()
if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
......
......@@ -40,8 +40,9 @@ function c13959634.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
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.RegisterFlagEffect(tp,13959634,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c13959634.hdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,2)
......
......@@ -10,20 +10,21 @@ function c16255442.initial_effect(c)
c:RegisterEffect(e1)
end
function c16255442.filter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand()
end
function c16255442.target(e,tp,eg,ep,ev,re,r,rp,chk)
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)
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)
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
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()
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
local tg=Duel.GetMatchingGroup(c16255442.filter,tp,LOCATION_GRAVE,0,nil)
......
......@@ -18,9 +18,9 @@ end
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 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)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c20210570.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -33,7 +33,7 @@ function c22666164.filter(c,e,tp)
end
function c22666164.target(e,tp,eg,ep,ev,re,r,rp,chk)
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)
end
function c22666164.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
local code=tc:GetOriginalCode()
local ba=tc:GetBaseAttack()
local bd=tc:GetBaseDefence()
local reset_flag=RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END
c:CopyEffect(code, reset_flag, 1)
local e1=Effect.CreateEffect(c)
......@@ -51,12 +50,5 @@ function c30312361.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetValue(ba)
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
......@@ -2,7 +2,7 @@
function c33725271.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetCategory(CATEGORY_TODECK)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......@@ -14,11 +14,11 @@ function c33725271.filter(c)
return c:IsSetCard(0x32) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
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
function c33725271.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
......
......@@ -4,6 +4,7 @@ function c41482598.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c41482598.clear)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
......@@ -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)
end
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)
Duel.Draw(tp,4-ht,REASON_EFFECT)
e:GetLabelObject():SetLabel(4-ht)
if ht<4 then
Duel.Draw(tp,4-ht,REASON_EFFECT)
e:GetLabelObject():SetLabel(4-ht)
else e:GetLabelObject():SetLabel(0) end
end
function c41482598.dccon(e,tp,eg,ep,ev,re,r,rp)
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)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,e:GetLabel())
end
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 sg=g:RandomSelect(tp,e:GetLabel())
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
......
......@@ -8,6 +8,7 @@ function c50491121.initial_effect(c)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCountLimit(1)
e1:SetCondition(c50491121.atkcon)
e1:SetTarget(c50491121.atktg)
e1:SetOperation(c50491121.atkop)
......
......@@ -2,7 +2,7 @@
function c69091732.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetCategory(CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetHintTiming(0,TIMING_TOHAND)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......
......@@ -16,14 +16,14 @@ function c69257165.ctffilter(c,lv)
end
function c69257165.ctfilter(c,tp)
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
function c69257165.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
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 e:GetLabel()~=100 then return false end
e:SetLabel(0)
......@@ -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 lv=sg:GetFirst():GetLevel()
e:SetLabel(lv)
Duel.SendtoGrave(sg,REASON_COST)
Duel.SendtoGrave(sg,REASON_COST+REASON_DISCARD)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c69257165.ctffilter,tp,0,LOCATION_MZONE,1,1,nil,lv)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
......
......@@ -22,7 +22,7 @@ function c73178098.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
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)
tc:RegisterEffect(e1)
end
......
......@@ -16,9 +16,9 @@ end
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 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)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c81985784.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -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)
end
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
and Duel.IsExistingTarget(c94573223.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
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
function c94878265.operation(e,tp,eg,ep,ev,re,r,rp)
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