Commit 1504bcdb authored by Nemo Ma's avatar Nemo Ma

HM Fixes

parent 2eb1421f
......@@ -37,7 +37,7 @@ function c33700192.initial_effect(c)
c:RegisterEffect(e8)
local e9=e7:Clone()
e9:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e9:SetTarget(c33700192.sumlimit)
e9:SetTarget(function(e,c,sump,sumtype,sumpos,targetp) return bit.band(sumpos,POS_FACEDOWN)>0 end)
c:RegisterEffect(e9)
--This card cannot be changed to Defense Position, except with a card effect.
local ea=Effect.CreateEffect(c)
......@@ -54,7 +54,7 @@ function c33700192.initial_effect(c)
local ec=eb:Clone()
ec:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
ec:SetValue(function(e,c) return c~=e:GetHandler() end)
c:RegisterEffect(ec)
c:RegisterEffect(e)
--On your 2nd Standby Phase after this card is Normal or Special Summoned, Destroy this card.
local ed=Effect.CreateEffect(c)
ed:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......@@ -75,9 +75,6 @@ function c33700192.initial_effect(c)
ef:SetOperation(c33700192.spop)
c:RegisterEffect(ef)
end
function c33700192.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0
end
function c33700192.desreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:SetTurnCounter(0)
......@@ -85,7 +82,7 @@ function c33700192.desreg(e,tp,eg,ep,ev,re,r,rp)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_PHASE_START+PHASE_STANDBY)
e0:SetCountLimit(1)
e0:SetOperation(c77565204.ctop)
e0:SetOperation(c33700192.ctop)
Duel.RegisterEffect(e0,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -126,7 +123,7 @@ function c33700192.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetParam(2000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,2000)
end
function c33700192.recop(e,tp,eg,ep,ev,re,r,rp)
function c33700192.spop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
......@@ -36,7 +36,7 @@ function c33700193.initial_effect(c)
c:RegisterEffect(e8)
local e9=e7:Clone()
e9:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e9:SetTarget(c33700193.sumlimit)
e9:SetTarget(function(e,c,sump,sumtype,sumpos,targetp) return bit.band(sumpos,POS_FACEDOWN)>0 end)
c:RegisterEffect(e9)
--This card cannot be changed to Defense Position, except with a card effect.
local ea=Effect.CreateEffect(c)
......@@ -53,7 +53,7 @@ function c33700193.initial_effect(c)
local ec=eb:Clone()
ec:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
ec:SetValue(function(e,c) return c~=e:GetHandler() end)
c:RegisterEffect(ec)
c:RegisterEffect(e)
--On your 2nd Standby Phase after this card is Normal or Special Summoned, Destroy this card.
local ed=Effect.CreateEffect(c)
ed:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......@@ -74,9 +74,6 @@ function c33700193.initial_effect(c)
ef:SetOperation(c33700193.spop)
c:RegisterEffect(ef)
end
function c33700193.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0
end
function c33700193.desreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:SetTurnCounter(0)
......@@ -127,23 +124,17 @@ end
function c33700193.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if not Duel.IsPlayerCanSpecialSummonMonster(tp,33700213,0,0x4011,3000,2800,6,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,33700213)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
token:SetCardData(CARDDATA_LEVEL,6)
token:SetCardData(CARDDATA_ATTRIBUTE,ATTRIBUTE_LIGHT)
token:SetCardData(CARDDATA_RACE,RACE_FAIRY)
token:SetCardData(CARDDATA_ATTACK,3000)
token:SetCardData(CARDDATA_DEFENSE,2800)
if not Duel.IsPlayerCanSpecialSummonMonster(tp,33700193,0x444,0x4011,3000,2800,6,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,33700193,0x444,0x4011,3000,2800,6,RACE_FAIRY,ATTRIBUTE_LIGHT)
--When this card is attacked, destroy the attacking monster after damage calculation.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLED)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(c33700193.condition)
e1:SetCardTarget(c33700193.condition)
e1:SetOperation(c33700193.operation)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
Duel.SpecialSummonComplete()
e1:SetReset(RESET_EVENT+0xfe0000)
token:RegisterEffect(e1)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
function c33700193.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget()==e:GetHandler()
......
......@@ -54,7 +54,7 @@ function c33700196.initial_effect(c)
local ec=eb:Clone()
ec:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
ec:SetValue(function(e,c) return c~=e:GetHandler() end)
c:RegisterEffect(ec)
c:RegisterEffect(e)
--On your 2nd Standby Phase after this card is Normal or Special Summoned, Destroy this card.
local ed=Effect.CreateEffect(c)
ed:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......@@ -66,15 +66,14 @@ function c33700196.initial_effect(c)
ee:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(ee)
--If this card leaves the field: If it left the field by its own effect, Draw 2 Cards. Otherwise, you can look at 3 cards from the top of your Deck, then place them on the top of the Deck in any order.
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetCondition(c33700196.drcon)
e1:SetTarget(c33700196.drtg)
e1:SetOperation(c33700196.drop)
c:RegisterEffect(e1)
local ef=Effect.CreateEffect(c)
ef:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
ef:SetCode(EVENT_LEAVE_FIELD)
ef:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
ef:SetCategory(CATEGORY_DRAW)
ef:SetTarget(c33700196.drtg)
ef:SetOperation(c33700196.drop)
c:RegisterEffect(ef)
end
function c33700196.desreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -118,9 +117,6 @@ function c33700196.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
--end
end
function c33700196.drcon(e,tp,eg,ep,ev,re,r,rp)
return true
end
function c33700196.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
......@@ -139,7 +135,7 @@ function c33700196.drop(e,tp,eg,ep,ev,re,r,rp,chk)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
else
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 or not Duel.SelectEffectYesNo(tp,aux.Stringid(122518919,7)) then return end
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 or not Duel.SelectYesNo(tp,aux.Stringid(33700196,7)) then return end
Duel.SortDecktop(tp,tp,3)
end
end
......@@ -53,7 +53,7 @@ function c33700198.initial_effect(c)
local ec=eb:Clone()
ec:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
ec:SetValue(function(e,c) return c~=e:GetHandler() end)
c:RegisterEffect(ec)
c:RegisterEffect(e)
--On your 2nd Standby Phase after this card is Normal or Special Summoned, Destroy this card.
local ed=Effect.CreateEffect(c)
ed:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......@@ -123,10 +123,10 @@ end
function c33700198.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local ct=g:GetCount()
local rg=Duel.GetDecktopGroup(tp,ct)
if Duel.IsChainDisablable(0) and rg:FilterCount(Card.IsAbleToRemoveAsCost,nil)==ct
and Duel.SelectYesNo(1-tp,aux.Stringid(80764541,1)) then
Duel.DisableShuffleCheck()
local rg=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if Duel.IsChainDisablable(0) and rg:FilterCount(Card.IsAbleToRemoveAsCost,nil)>=ct
and Duel.SelectYesNo(1-tp,aux.Stringid(33700198,1)) then
rg=rg:Select(1-tp,ct,ct,nil)
Duel.Remove(rg,POS_FACEDOWN,REASON_COST)
Duel.NegateEffect(0)
return
......
......@@ -25,9 +25,9 @@ function c33700200.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCategory(CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON)
e1:SetCost(c33700200.cost)
e1:SetTarget(c33700200.target)
e1:SetOperation(c33700200.operation)
e3:SetCost(c33700200.cost)
e3:SetTarget(c33700200.target)
e3:SetOperation(c33700200.spop)
c:RegisterEffect(e3)
end
function c33700200.lfilter(c)
......
......@@ -5,7 +5,7 @@ function c33700204.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,33700204)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetCardTarget(CATEGORY_TOGRAVE)
e1:SetTarget(c33700204.tg)
e1:SetOperation(c33700204.op)
c:RegisterEffect(e1)
......@@ -15,7 +15,7 @@ function c33700204.filter(c)
end
function c33700204.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700204.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil) end
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil)
local g1=Duel.GetMatchingGroup(c33700204.filter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,1,0,0)
end
......@@ -27,5 +27,5 @@ function c33700204.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local dg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(dg)
Duel.SendtoGrave(dg)
Duel.SendtoGrave(dg,REASON_EFFECT)
end
......@@ -98,7 +98,7 @@ function c33700207.drcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c33700207.cfilter,1,nil,tp)
and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS))
end
function c33700206.hfilter(c)
function c33700207.hfilter(c)
return c:IsFaceup() and c:IsSetCard(0x444) and c:IsAbleToGraveAsCost()
end
function c33700207.drop1(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -13,7 +13,7 @@ end
function c33700208.filter(c)
return c:IsSetCard(0x444) and c:IsAbleToDeck()
end
function c33700208.tg(e,tp,eg,ep,ev,re,r,rp)
function c33700208.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700208.filter,tp,LOCATION_GRAVE,0,3,nil)
and Duel.IsPlayerCanDraw(tp,1) end
local g=Duel.GetMatchingGroup(c33700208.filter,tp,LOCATION_GRAVE,0,nil)
......@@ -37,7 +37,7 @@ function c33700208.op(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetOperatedGroup():Filter(Card.IsLocation,tp,LOCATION_HAND)
--And if it's a "Heavenly Maid" monster, you can Special Summon it.
local sg=dg:Filter(c33700208.spfilter,nil,e,tp)
if sg:GetCount()>0 then
if sg:GetCount()>0 and Duel.SelectYesNo(tp,2) then
if sg:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=sg:Select(tp,1,1,nil)
......
......@@ -19,6 +19,12 @@ function c33700209.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_SZONE)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e5)
end
function c33700209.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x444)
......@@ -33,12 +39,12 @@ end
function c33700209.filter(c,e,tp)
return c:IsSetCard(0x444) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33700209.target(e,tp,eg,ep,ev,re,r,rp,chk)
function c33700209.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c33700209.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
function c33700209.activate(e,tp,eg,ep,ev,re,r,rp)
function c33700209.spop(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(c33700209.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
......
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