Commit 128fabd2 authored by Nemo Ma's avatar Nemo Ma

fix

parent 58a6bde6
......@@ -75,9 +75,10 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()<=0 or not e:GetHandler():IsAbleToExtra() then return end
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if c:IsRelateToEffect(e) then
tg:AddCard(e:GetHandler())
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
......
......@@ -17,7 +17,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
--Effect 2
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_LEAVE_GRAVE)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_SZONE)
......@@ -128,4 +128,3 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
end
end
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,cm.matfilter,2,2)
aux.AddLinkProcedure(c,cm.matfilter,1,1)
--cannot be link material
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
......@@ -24,7 +24,7 @@ function cm.initial_effect(c)
end
--link summon
function cm.matfilter(c)
return c:IsLinkType(TYPE_PENDULUM) and c:IsLevelAbove(5)
return c:IsLinkType(TYPE_PENDULUM) and c:IsLevelAbove(7)
end
function cm.repfilter(c,tp)
return c:GetOwner()==tp and c:GetDestination()==LOCATION_GRAVE and not c:IsLocation(LOCATION_EXTRA) and c:GetOriginalType()&TYPE_PENDULUM~=0
......
......@@ -69,4 +69,4 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_ZOMBIE)
end
\ No newline at end of file
end
......@@ -42,6 +42,7 @@ function c33200069.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(33200069,0))
end
function c33200069.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
......@@ -64,6 +65,7 @@ function c33200069.smtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c33200069.smfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(33200069,1))
end
function c33200069.smop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
......@@ -41,5 +41,7 @@ function c33700384.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c33700384.actcon(e)
return Duel.GetAttacker():IsControler(e:GetHandlerPlayer()) and not Duel.GetAttackTarget()
end
\ No newline at end of file
local tp=e:GetHandlerPlayer()
local a=Duel.GetAttacker()
return a and a:IsControler(tp) and not Duel.GetAttackTarget()
end
......@@ -35,8 +35,8 @@ function cm.filter(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroupCount(nil,tp,LOCATION_DECK,0,nil)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.adcheck(c)
return c:IsSetCard(0x442) and c:IsAbleToHand()
......@@ -45,7 +45,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local p=tp
local num=Duel.GetMatchingGroupCount(nil,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(p,cm.filter,p,LOCATION_GRAVE+LOCATION_HAND,0,1,num,nil)
local g=Duel.SelectMatchingCard(p,aux.NecroValleyFilter(cm.filter),p,LOCATION_GRAVE+LOCATION_HAND,0,1,num,nil)
if g:GetCount()>0 then
local ct=Duel.SendtoDeck(g,nil,1,REASON_EFFECT)
Duel.BreakEffect()
......@@ -73,6 +73,7 @@ end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(cm.disfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local sg=Duel.SelectMatchingCard(tp,cm.disfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(sg,REASON_DISCARD+REASON_COST)
......
......@@ -16,7 +16,7 @@ function c33711008.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33711008,2))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLED)
e2:SetCountLimit(1)
e2:SetCondition(c33711008.thcon)
......
......@@ -44,7 +44,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if fg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)==#fg or (#g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
Duel.SendtoGrave(sg,REASON_COST)
e:SetLabel(1)
else e:SetLabel(0) end
end
......
......@@ -131,18 +131,18 @@ local opt=e:GetLabel()
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(c53503015.drop)
e1:SetOperation(c63790308.drop)
Duel.RegisterEffect(e1,tp)
elseif opt==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c53503015.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c63790308.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function c53503015.drop(e,tp,eg,ep,ev,re,r,rp)
function c63790308.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,53503015)
if Duel.Draw(tp,2,REASON_EFFECT)==2 then
Duel.ShuffleHand(tp)
......@@ -162,7 +162,7 @@ end
function c63790308.hupop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c69167267.spfilter1),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c63790308.spfilter1),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
Duel.BreakEffect()
......
......@@ -67,7 +67,7 @@ function cm.spfilter(c,e,tp)
return c.setname=="Axisevil" and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
......
......@@ -21,7 +21,6 @@ function c64800120.initial_effect(c)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,64800120)
e1:SetCost(c64800120.spcost)
e1:SetTarget(c64800120.sptg)
e1:SetOperation(c64800120.spop)
c:RegisterEffect(e1)
......@@ -57,18 +56,14 @@ end
function c64800120.cfilter(c)
return (c:IsSetCard(0x341a) or c:IsLevelBelow(4)) and c:IsDiscardable()
end
function c64800120.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c64800120.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c64800120.cfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler())
end
function c64800120.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c64800120.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c64800120.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local c=e:GetHandler()
if Duel.DiscardHand(tp,c64800120.cfilter,1,1,REASON_EFFECT+REASON_DISCARD,e:GetHandler()) and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
......
......@@ -3,7 +3,8 @@ function c64800121.initial_effect(c)
--special summon from hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64800121,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,64800121)
......@@ -17,7 +18,7 @@ function c64800121.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,64800121)
e2:SetCountLimit(1,64810121)
e2:SetTarget(c64800121.sptg)
e2:SetOperation(c64800121.spop)
c:RegisterEffect(e2)
......
......@@ -19,7 +19,7 @@ function c64800125.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c64800125.tgfilter(c,lv)
return c:IsAbleToGrave() and not c:IsLevel(lv)
return c:IsAbleToGrave() and c:IsSetCard(0x341a) and not c:IsLevel(lv)
end
function c64800125.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) or Duel.IsExistingMatchingCard(c64800125.tgfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetLevel()) end
......
......@@ -36,7 +36,7 @@ end
function c72404133.costfilter(c,e,tp)
return c:IsFaceup() and c:IsRace(RACE_PLANT)
return (c:IsFaceup() or c:GetLocation()==LOCATION_HAND) and c:IsRace(RACE_PLANT)
and Duel.GetMZoneCount(tp,c,tp)>1
end
function c72404133.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -31,11 +31,10 @@ function c83000068.initial_effect(c)
e4:SetTarget(c83000068.thtg)
e4:SetOperation(c83000068.thop)
c:RegisterEffect(e4)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_EQUIP)
e12:SetCode(EFFECT_UPDATE_ATTACK)
e12:SetValue(1000)
c:RegisterEffect(e12)
Duel.AddCustomActivityCounter(83000068,ACTIVITY_SPSUMMON,c83000068.counterfilter)
end
function c83000068.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA)
end
function c83000068.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -62,7 +61,7 @@ function c83000068.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c83000068.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
if chk==0 then return Duel.GetCustomActivityCount(83000068,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......@@ -103,11 +102,18 @@ function c83000068.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(tc)
e1:SetValue(c83000068.eqlimit)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
end
function c83000068.eqlimit(e,c)
return c:IsFaceup() and c:IsAttackAbove(2400)
return c==e:GetLabelObject()
end
-----------
function c83000068.thfilter2(c)
......@@ -115,7 +121,7 @@ function c83000068.thfilter2(c)
end
function c83000068.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_FZONE) and c:IsPreviousPosition(POS_FACEUP)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c83000068.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c83000068.thfilter2,tp,LOCATION_DECK,0,1,nil) 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