Commit 7b2f0e1a authored by mercury233's avatar mercury233

fix

parent bfe27276
pics/101103082.jpg

75.5 KB | W: | H:

pics/101103082.jpg

80.8 KB | W: | H:

pics/101103082.jpg
pics/101103082.jpg
pics/101103082.jpg
pics/101103082.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/101103083.jpg

83.2 KB | W: | H:

pics/101103083.jpg

83.3 KB | W: | H:

pics/101103083.jpg
pics/101103083.jpg
pics/101103083.jpg
pics/101103083.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/101103085.jpg

78.2 KB | W: | H:

pics/101103085.jpg

84.3 KB | W: | H:

pics/101103085.jpg
pics/101103085.jpg
pics/101103085.jpg
pics/101103085.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/101103086.jpg

63 KB | W: | H:

pics/101103086.jpg

67.6 KB | W: | H:

pics/101103086.jpg
pics/101103086.jpg
pics/101103086.jpg
pics/101103086.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/101103087.jpg

62 KB | W: | H:

pics/101103087.jpg

71.5 KB | W: | H:

pics/101103087.jpg
pics/101103087.jpg
pics/101103087.jpg
pics/101103087.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/101103090.jpg

57.7 KB | W: | H:

pics/101103090.jpg

62.8 KB | W: | H:

pics/101103090.jpg
pics/101103090.jpg
pics/101103090.jpg
pics/101103090.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/101103091.jpg

62.7 KB | W: | H:

pics/101103091.jpg

67.3 KB | W: | H:

pics/101103091.jpg
pics/101103091.jpg
pics/101103091.jpg
pics/101103091.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/101103092.jpg

75.8 KB | W: | H:

pics/101103092.jpg

76 KB | W: | H:

pics/101103092.jpg
pics/101103092.jpg
pics/101103092.jpg
pics/101103092.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/101103098.jpg

70.7 KB | W: | H:

pics/101103098.jpg

70.7 KB | W: | H:

pics/101103098.jpg
pics/101103098.jpg
pics/101103098.jpg
pics/101103098.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -31,7 +31,7 @@ function c100416033.initial_effect(c)
--to hand/spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100416033,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,100416033+100)
......@@ -69,18 +69,13 @@ function c100416033.actfilter(c,tp)
end
function c100416033.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100416033.actfilter,tp,LOCATION_DECK,0,1,nil,tp) end
if not Duel.CheckPhaseActivity() then e:SetLabel(1) else e:SetLabel(0) end
end
function c100416033.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end
local g=Duel.SelectMatchingCard(tp,c100416033.actfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
Duel.ResetFlagEffect(tp,15248873)
local tc=g:GetFirst()
if tc then
local te=tc:GetActivateEffect()
if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end
Duel.ResetFlagEffect(tp,15248873)
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
......@@ -127,8 +122,6 @@ function c100416033.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c100416033.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100416033.tgfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,true) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_GRAVE)
end
function c100416033.thop(e,tp,eg,ep,ev,re,r,rp)
local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -23,7 +23,7 @@ function c100416035.initial_effect(c)
e3:SetDescription(aux.Stringid(100416035,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c100416035.destg)
e3:SetOperation(c100416035.desop)
......
......@@ -23,31 +23,17 @@ function c101103081.initial_effect(c)
e2:SetTarget(c101103081.splimit)
c:RegisterEffect(e2)
end
function c101103081.costfilter(c,e,tp,normal)
return c:IsDiscardable() and (not normal or c:IsType(TYPE_NORMAL)) and Duel.IsExistingMatchingCard(c101103081.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,c,e,tp,normal)
function c101103081.costfilter(c,e,tp)
return c:IsDiscardable() and Duel.IsExistingMatchingCard(c101103081.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,c,e,tp,c:IsType(TYPE_NORMAL))
end
function c101103081.spfilter(c,e,tp,normal)
return (normal and c:IsSetCard(0x262) or c:IsLevel(3) and c:IsType(TYPE_NORMAL)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101103081.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100,0)
local b1=Duel.IsExistingMatchingCard(c101103081.costfilter,tp,LOCATION_HAND,0,1,nil,e,tp,false)
local b2=Duel.IsExistingMatchingCard(c101103081.costfilter,tp,LOCATION_HAND,0,1,nil,e,tp,true)
if chk==0 then return b1 or b2 end
local g1=Duel.GetMatchingGroup(c101103081.costfilter,tp,LOCATION_HAND,0,nil,e,tp,false)
local g2=Duel.GetMatchingGroup(c101103081.costfilter,tp,LOCATION_HAND,0,nil,e,tp,true)
local sg=nil
if b1 and not b2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
sg=g1:Select(tp,1,1,nil)
elseif not b1 and b2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
sg=g2:Select(tp,1,1,nil)
else
g1:Merge(g2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
sg=g1:Select(tp,1,1,nil)
end
if chk==0 then return Duel.IsExistingMatchingCard(c101103081.costfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local sg=Duel.SelectMatchingCard(tp,c101103081.costfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if sg:GetFirst():IsType(TYPE_NORMAL) then
e:SetLabel(100,1)
else
......@@ -56,26 +42,18 @@ function c101103081.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(sg,REASON_COST+REASON_DISCARD)
end
function c101103081.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c101103081.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,false)
local b2=Duel.IsExistingMatchingCard(c101103081.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,true)
local check,label=e:GetLabel()
if chk==0 then
e:SetLabel(0,0)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
if check==100 then
return b1 or b2
else
return b1
end
return check==100 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
e:SetLabel(0,label)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c101103081.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local normal=false
local check,label=e:GetLabel()
if label==1 then normal=true end
local normal=label==1
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101103081.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,normal)
if g:GetCount()>0 then
......
......@@ -40,7 +40,7 @@ function c101103082.discost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c101103082.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject()
if chk==0 then return bc and aux.disfilter1(bc) end
if chk==0 then return bc end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,bc,1,0,0)
end
function c101103082.disop(e,tp,eg,ep,ev,re,r,rp)
......
--Triphasic Dealmon Coordius
--Coordius the Triphasic Dealmon
--Scripted by mallu11
function c101103083.initial_effect(c)
......@@ -30,7 +30,7 @@ end
function c101103083.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY+CATEGORY_ATKCHANGE+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetRange(LOCATION_MZONE)
......@@ -45,7 +45,6 @@ function c101103083.thfilter(c)
end
function c101103083.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLP(tp)>=2000 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_GRAVE)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101103083,0))
end
function c101103083.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -78,7 +78,7 @@ function c101103085.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect()
local atk=tc:GetBaseAttack()
if atk<0 then atk=0 end
Duel.Damage(1-tp,atk/2,REASON_EFFECT)
Duel.Damage(1-tp,math.ceil(atk/2),REASON_EFFECT)
end
end
end
......
......@@ -27,8 +27,8 @@ function c101103089.operation(e,tp,eg,ep,ev,re,r,rp)
if tc then
Duel.HintSelection(g)
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) and tc:IsType(TYPE_MONSTER) then
local atk=tc:GetTextAttack()
local def=tc:GetTextDefense()
local atk=tc:GetBaseAttack()
local def=tc:GetBaseDefense()
local rec=atk>=def and atk or def
if rec>0 then
Duel.BreakEffect()
......
--War Lock Fortia
--War Rock Fortia
--Scripted by Kohana Sonogami
function c101103093.initial_effect(c)
--tohand & atkchange
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103093,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOHAND)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_BATTLED)
......@@ -17,7 +17,7 @@ function c101103093.initial_effect(c)
e2:SetDescription(aux.Stringid(101103093,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101103093+100)
e2:SetCondition(c101103093.spcon)
......@@ -32,14 +32,8 @@ function c101103093.check(c,tp)
return c and c:IsControler(tp) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR)
end
function c101103093.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttackTarget()~=nil
and (c101103093.check(Duel.GetAttacker(),tp) or c101103093.check(Duel.GetAttackTarget(),tp))
if chk==0 then return (c101103093.check(Duel.GetAttacker(),tp) or c101103093.check(Duel.GetAttackTarget(),tp))
and Duel.IsExistingMatchingCard(c101103093.thfilter,tp,LOCATION_DECK,0,1,nil) end
if c101103093.check(Duel.GetAttacker(),tp) then
Duel.SetTargetCard(Duel.GetAttackTarget())
else
Duel.SetTargetCard(Duel.GetAttacker())
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101103093.atkfilter(c)
......@@ -49,25 +43,27 @@ function c101103093.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101103093.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c101103093.atkfilter,tp,LOCATION_MZONE,0,1,nil) then
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
local sg=Duel.GetMatchingGroup(c101103093.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=sg:GetFirst()
for tc in aux.Next(sg) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,Duel.GetTurnPlayer()==tp and 2 or 1)
e1:SetValue(200)
tc:RegisterEffect(e1)
if Duel.IsExistingMatchingCard(c101103093.atkfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.BreakEffect()
local sg=Duel.GetMatchingGroup(c101103093.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=sg:GetFirst()
for tc in aux.Next(sg) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e1:SetValue(200)
tc:RegisterEffect(e1)
end
end
end
end
function c101103093.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT)
return rp==1-tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT)
end
function c101103093.spfilter(c,e,tp)
return c:IsLevelAbove(5) and c:IsSetCard(0x263) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -7,7 +7,6 @@ function c101103094.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,101103094)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c101103094.spcon1)
e1:SetTarget(c101103094.sptg1)
......@@ -18,9 +17,9 @@ function c101103094.initial_effect(c)
e2:SetDescription(aux.Stringid(101103094,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101103094+100)
e2:SetCountLimit(1,101103094)
e2:SetCondition(c101103094.spcon2)
e2:SetTarget(c101103094.sptg2)
e2:SetOperation(c101103094.spop2)
......@@ -44,7 +43,7 @@ function c101103094.spop1(e,tp,eg,ep,ev,re,r,rp)
end
function c101103094.spcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT)
return rp==1-tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT)
end
function c101103094.spfilter2(c,e,tp)
return c:IsLevelAbove(5) and c:IsSetCard(0x263) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -28,7 +28,7 @@ end
function c101103095.ntcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
return minc==0 and c:IsLevelAbove(4) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or not Duel.IsExistingMatchingCard(c101103095.cfilter,tp,LOCATION_MZONE,0,1,nil))
end
function c101103095.tgfilter(c)
......@@ -38,14 +38,8 @@ function c101103095.check(c,tp)
return c and c:IsControler(tp) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR)
end
function c101103095.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttackTarget()~=nil
and (c101103095.check(Duel.GetAttacker(),tp) or c101103095.check(Duel.GetAttackTarget(),tp))
if chk==0 then return (c101103095.check(Duel.GetAttacker(),tp) or c101103095.check(Duel.GetAttackTarget(),tp))
and Duel.IsExistingMatchingCard(c101103095.tgfilter,tp,LOCATION_DECK,0,1,nil) end
if c101103095.check(Duel.GetAttacker(),tp) then
Duel.SetTargetCard(Duel.GetAttackTarget())
else
Duel.SetTargetCard(Duel.GetAttacker())
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c101103095.atkfilter(c)
......@@ -55,7 +49,7 @@ function c101103095.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101103095.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT) then
if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 then
Duel.BreakEffect()
local sg=Duel.GetMatchingGroup(c101103095.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=sg:GetFirst()
......@@ -64,7 +58,7 @@ function c101103095.tgop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,Duel.GetTurnPlayer()==tp and 2 or 1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e1:SetValue(200)
tc:RegisterEffect(e1)
end
......
--War Lock Skyler
--War Rock Skyler
--Scripted by Kohana Sonogami
function c101103096.initial_effect(c)
--atkup
......@@ -15,31 +15,46 @@ function c101103096.initial_effect(c)
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,101103096)
e2:SetCondition(c101103096.spcon)
e2:SetTarget(c101103096.sptg)
e2:SetOperation(c101103096.spop)
c:RegisterEffect(e2)
if not c101103096.global_check then
c101103096.global_check=true
local ge1=Effect.GlobalEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BATTLED)
ge1:SetOperation(c101103096.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c101103096.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
function c101103096.check(c)
return c and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH)
end
function c101103096.val(e,c)
return Duel.GetMatchingGroupCount(c101103096.atkfilter,c:GetControler(),0,LOCATION_MZONE,nil)*100
function c101103096.checkop(e,tp,eg,ep,ev,re,r,rp)
local c0,c1=Duel.GetBattleMonster(0)
if c101103096.check(c0) then
Duel.RegisterFlagEffect(0,101103096,RESET_PHASE+PHASE_END,0,1)
end
if c101103096.check(c1) then
Duel.RegisterFlagEffect(1,101103096,RESET_PHASE+PHASE_END,0,1)
end
end
function c101103096.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) and c:GetBattledGroupCount()>0
function c101103096.val(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)*100
end
function c101103096.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101103096.cfilter,tp,LOCATION_MZONE,0,1,nil)
return Duel.GetFlagEffect(tp,101103096)>0
and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c101103096.spfilter(c,e,tp)
return c:IsLevelAbove(5) and c:IsSetCard(0x263) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsLevelAbove(5) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101103096.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c101103096.spfilter(chkc,e,tp) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101103096.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101103096.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......@@ -62,7 +77,7 @@ function c101103096.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,Duel.GetTurnPlayer()==tp and 2 or 1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e1:SetValue(200)
tc:RegisterEffect(e1)
end
......
......@@ -18,19 +18,36 @@ function c101103097.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,101103097+100)
e2:SetCondition(c101103097.spcon)
e2:SetTarget(c101103097.sptg)
e2:SetOperation(c101103097.spop)
c:RegisterEffect(e2)
if not c101103097.global_check then
c101103097.global_check=true
local ge1=Effect.GlobalEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BATTLED)
ge1:SetOperation(c101103097.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c101103097.check(c)
return c and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH)
end
function c101103097.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) and c:GetBattledGroupCount()>0
function c101103097.checkop(e,tp,eg,ep,ev,re,r,rp)
local c0,c1=Duel.GetBattleMonster(0)
if c101103097.check(c0) then
Duel.RegisterFlagEffect(0,101103097,RESET_PHASE+PHASE_END,0,1)
end
if c101103097.check(c1) then
Duel.RegisterFlagEffect(1,101103097,RESET_PHASE+PHASE_END,0,1)
end
end
function c101103097.dracon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101103097.cfilter,tp,LOCATION_MZONE,0,1,nil)
return Duel.GetFlagEffect(tp,101103097)>0
and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c101103097.atkfilter(c)
......@@ -50,14 +67,13 @@ function c101103097.draop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,Duel.GetTurnPlayer()==tp and 2 or 1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e1:SetValue(200)
tc:RegisterEffect(e1)
end
end
function c101103097.spfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsSetCard(0x253) and c:IsType(TYPE_MONSTER)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_BATTLE)
return c:IsPreviousControler(tp) and c:IsSetCard(0x253) and c:IsType(TYPE_MONSTER)
end
function c101103097.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101103097.spfilter,1,nil,tp)
......
--War Rock Ordeal
--Scripted by Kohana Sonogami
function c101103098.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE)
c:EnableCounterPermit(0x61,LOCATION_SZONE)
c:SetUniqueOnField(1,0,101103098)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c101103098.activate)
......@@ -13,42 +14,45 @@ function c101103098.initial_effect(c)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103098,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetRange(LOCATION_SZONE)
e2:SetCost(c101103098.drcost)
e2:SetCondition(c101103098.drcon)
e2:SetTarget(c101103098.drtg)
e2:SetOperation(c101103098.drop)
c:RegisterEffect(e2)
end
function c101103098.activate(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x61,3)
local c=e:GetHandler()
c:AddCounter(0x61,3)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_SELF_TOGRAVE)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c101103098.sdcon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
function c101103098.drcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget()
return at:IsControler(tp) and at:IsFaceup() and at:IsSetCard(0x263)
function c101103098.sdcon(e)
return e:GetHandler():GetCounter(0x61)==0
end
function c101103098.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
function c101103098.drcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local at=tc:GetBattleTarget()
return eg:GetCount()==1 and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE)
and at:IsRelateToBattle() and at:IsControler(tp) and at:IsSetCard(0x263)
end
function c101103098.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsPlayerCanDraw(tp,1) and c:IsCanRemoveCounter(tp,0x61,1,REASON_COST)
end
e:SetLabel(0)
c:RemoveCounter(tp,0x61,1,REASON_COST)
if c:GetCounter(0x61)==0 then
Duel.SendtoGrave(c,REASON_EFFECT)
end
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x61,1,REASON_EFFECT) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101103098.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
if e:GetHandler():RemoveCounter(tp,0x61,1,REASON_EFFECT) then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
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