Commit 79d60beb authored by argon.sun's avatar argon.sun

fix & new

parent 088737d4
...@@ -953,11 +953,16 @@ int32 scriptlib::card_is_disabled(lua_State *L) { ...@@ -953,11 +953,16 @@ int32 scriptlib::card_is_disabled(lua_State *L) {
int32 scriptlib::card_is_destructable(lua_State *L) { int32 scriptlib::card_is_destructable(lua_State *L) {
check_param_count(L, 1); check_param_count(L, 1);
check_param(L, PARAM_TYPE_CARD, 1); check_param(L, PARAM_TYPE_CARD, 1);
effect* peffect = 0;
if(lua_gettop(L) > 1) {
check_param(L, PARAM_TYPE_EFFECT, 2);
peffect = *(effect**) lua_touserdata(L, 2);
}
card* pcard = *(card**) lua_touserdata(L, 1); card* pcard = *(card**) lua_touserdata(L, 1);
if(pcard->is_destructable()) if(peffect)
lua_pushboolean(L, 1); lua_pushboolean(L, pcard->is_destructable_by_effect(peffect, pcard->pduel->game_field->core.reason_player));
else else
lua_pushboolean(L, 0); lua_pushboolean(L, pcard->is_destructable());
return 1; return 1;
} }
int32 scriptlib::card_is_summonable(lua_State *L) { int32 scriptlib::card_is_summonable(lua_State *L) {
......
...@@ -41,9 +41,6 @@ function c10352095.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,9 +41,6 @@ function c10352095.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Equip(tp,e:GetHandler(),tc) Duel.Equip(tp,e:GetHandler(),tc)
end end
end end
function c10352095.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsFaceup,e:GetHandler():GetControler(),LOCATION_MZONE,0,nil)*800
end
function c10352095.value(e,c) function c10352095.value(e,c)
return e:GetLabel() return e:GetLabel()
end end
...@@ -6,7 +6,7 @@ function c12503902.initial_effect(c) ...@@ -6,7 +6,7 @@ function c12503902.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_DAMAGE_STEP) e1:SetHintTiming(0,TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET_EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetTarget(c12503902.target) e1:SetTarget(c12503902.target)
e1:SetOperation(c12503902.operation) e1:SetOperation(c12503902.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -24,7 +24,7 @@ function c12644061.initial_effect(c) ...@@ -24,7 +24,7 @@ function c12644061.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
-- --
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(74823665,0)) e4:SetDescription(aux.Stringid(12644061,0))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PRE_BATTLE_DAMAGE) e4:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e4:SetRange(LOCATION_SZONE) e4:SetRange(LOCATION_SZONE)
......
--聖なる守り手
function c1347977.initial_effect(c)
--todeck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1347977,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c1347977.target)
e1:SetOperation(c1347977.activate)
c:RegisterEffect(e1)
end
function c1347977.filter1(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c1347977.filter2(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c1347977.filter3(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR)
end
function c1347977.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,c1347977.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g1:GetCount()==0 then return end
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0)
if Duel.IsExistingMatchingCard(c1347977.filter3,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingTarget(c1347977.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,g1:GetFirst())
and Duel.SelectYesNo(tp,aux.Stringid(1347977,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g2=Duel.SelectTarget(tp,c1347977.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g2,1,0,0)
end
end
function c1347977.activate(e,tp,eg,ep,ev,re,r,rp)
local ex,g1=Duel.GetOperationInfo(0,CATEGORY_TODECK)
local ex,g2=Duel.GetOperationInfo(0,CATEGORY_TOHAND)
local tc1=g1:GetFirst()
if tc1 and tc1:IsRelateToEffect(e) then
Duel.SendtoDeck(g1,nil,0,REASON_EFFECT)
end
if g2 and g2:GetFirst():IsRelateToEffect(e) then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
end
end
...@@ -15,7 +15,7 @@ function c13626450.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -15,7 +15,7 @@ function c13626450.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end end
function c13626450.filter(c) function c13626450.filter(c)
return c:IsFaceup() and c:IsGetType()==TYPE_TRAP+TYPE_CONTINUOUS and c:IsDestructable() return c:IsFaceup() and c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS and c:IsDestructable()
end end
function c13626450.target(e,tp,eg,ep,ev,re,r,rp,chk) function c13626450.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c13626450.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c13626450.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
......
...@@ -4,6 +4,7 @@ function c14342283.initial_effect(c) ...@@ -4,6 +4,7 @@ function c14342283.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atk up --atk up
...@@ -11,7 +12,7 @@ function c14342283.initial_effect(c) ...@@ -11,7 +12,7 @@ function c14342283.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c14342283.tg) e2:SetTarget(c14342283.tg)
e2:SetValue(1000) e2:SetValue(1000)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -20,7 +21,7 @@ function c14342283.initial_effect(c) ...@@ -20,7 +21,7 @@ function c14342283.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c14342283.tg) e3:SetTarget(c14342283.tg)
e3:SetValue(1) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
......
...@@ -30,7 +30,7 @@ function c14729426.cttg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,7 +30,7 @@ function c14729426.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
local a=e:GetLabelObject() local a=e:GetLabelObject()
if a:IsControler(1-tp) and a:GetRealFieldID()==e:GetLabel() then if a:IsControler(1-tp) and a:GetRealFieldID()==e:GetLabel() then
Duel.SetTargetCard(a) Duel.SetTargetCard(a)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_CONTROL,a,1,0,0)
end end
end end
function c14729426.ctop(e,tp,eg,ep,ev,re,r,rp) function c14729426.ctop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -14,7 +14,7 @@ function c15684835.filter(c,tp) ...@@ -14,7 +14,7 @@ function c15684835.filter(c,tp)
return c:IsFaceup() and c:IsControler(1-tp) return c:IsFaceup() and c:IsControler(1-tp)
end end
function c15684835.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c15684835.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:Contains(chkc) end if chkc then return eg:IsContains(chkc) end
if chk==0 then return eg:IsExists(c15684835.filter,1,nil,tp) end if chk==0 then return eg:IsExists(c15684835.filter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=eg:FilterSelect(tp,c15684835.filter,1,1,nil,tp) local g=eg:FilterSelect(tp,c15684835.filter,1,1,nil,tp)
......
...@@ -15,7 +15,7 @@ function c1669772.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -15,7 +15,7 @@ function c1669772.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end end
function c1669772.filter(c) function c1669772.filter(c)
return c:IsFaceup() and c:IsGetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsDestructable() return c:IsFaceup() and c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsDestructable()
end end
function c1669772.target(e,tp,eg,ep,ev,re,r,rp,chk) function c1669772.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1669772.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c1669772.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
......
...@@ -4,6 +4,7 @@ function c1896112.initial_effect(c) ...@@ -4,6 +4,7 @@ function c1896112.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c1896112.cost) e1:SetCost(c1896112.cost)
e1:SetTarget(c1896112.target) e1:SetTarget(c1896112.target)
......
--遺言の仮面
function c22610082.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c22610082.activate)
c:RegisterEffect(e1)
end
function c22610082.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:CancelToGrave()
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
end
...@@ -29,7 +29,7 @@ function c23842445.initial_effect(c) ...@@ -29,7 +29,7 @@ function c23842445.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c23842445.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c23842445.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c23842445.filter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
......
...@@ -29,7 +29,7 @@ function c30548775.spfilter(c,eg) ...@@ -29,7 +29,7 @@ function c30548775.spfilter(c,eg)
return c:IsReason(REASON_FUSION) and eg:IsContains(c:GetReasonCard()) return c:IsReason(REASON_FUSION) and eg:IsContains(c:GetReasonCard())
end end
function c30548775.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c30548775.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocaion(LOCATION_GRAVE) and c30548775.spfilter(chkc,eg) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c30548775.spfilter(chkc,eg) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c30548775.spfilter,tp,LOCATION_GRAVE,0,1,nil,eg) end and Duel.IsExistingTarget(c30548775.spfilter,tp,LOCATION_GRAVE,0,1,nil,eg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
--迎撃準備
function c31785398.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_BATTLE_PHASE,0x1c0+TIMING_BATTLE_PHASE)
e1:SetTarget(c31785398.target)
e1:SetOperation(c31785398.activate)
c:RegisterEffect(e1)
end
function c31785398.filter(c)
return c:IsFaceup() and c:IsCanTurnSet() and c:IsRace(RACE_WARRIOR+RACE_SPELLCASTER)
end
function c31785398.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c31785398.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c31785398.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c31785398.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c31785398.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE)
end
end
...@@ -61,13 +61,3 @@ function c32918479.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,13 +61,3 @@ function c32918479.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
end end
end end
function c32918479.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
end
function c32918479.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.SendtoGrave(c,REASON_EFFECT)
end
end
...@@ -9,7 +9,7 @@ function c34236961.initial_effect(c) ...@@ -9,7 +9,7 @@ function c34236961.initial_effect(c)
e1:SetOperation(c34236961.activate) e1:SetOperation(c34236961.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c34236961.condition(e,tp,eg,ep,ev,re,r,rp,chk) function c34236961.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if e:GetHandler():IsLocation(LOCATION_HAND) then h1=h1-1 end if e:GetHandler():IsLocation(LOCATION_HAND) then h1=h1-1 end
......
...@@ -30,7 +30,7 @@ function c34460239.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,7 +30,7 @@ function c34460239.activate(e,tp,eg,ep,ev,re,r,rp)
if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then
local hc=Duel.GetFirstMatchingCard(c34460239.filter2,tp,LOCATION_DECK,0,nil,tc:GetCode()) local hc=Duel.GetFirstMatchingCard(c34460239.filter2,tp,LOCATION_DECK,0,nil,tc:GetCode())
if hc then if hc then
Duel.SendtoHand(hc,nil,REAOSN_EFFECT) Duel.SendtoHand(hc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,hc) Duel.ConfirmCards(1-tp,hc)
end end
end end
......
...@@ -13,6 +13,7 @@ function c37104630.initial_effect(c) ...@@ -13,6 +13,7 @@ function c37104630.initial_effect(c)
e2:SetDescription(aux.Stringid(37104630,0)) e2:SetDescription(aux.Stringid(37104630,0))
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c37104630.descon) e2:SetCondition(c37104630.descon)
e2:SetTarget(c37104630.destg) e2:SetTarget(c37104630.destg)
......
--ブレイドナイト
function c39507162.initial_effect(c)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(400)
e1:SetCondition(c39507162.atkcon)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c39507162.discon)
e2:SetOperation(c39507162.disop)
c:RegisterEffect(e2)
end
function c39507162.atkcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)<=1
end
function c39507162.discon(e)
return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
function c39507162.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and bc:IsType(TYPE_FLIP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x17a0000)
bc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x17a0000)
bc:RegisterEffect(e2)
end
end
...@@ -24,7 +24,7 @@ function c39648965.atkfilter(c) ...@@ -24,7 +24,7 @@ function c39648965.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x13) return c:IsFaceup() and c:IsSetCard(0x13)
end end
function c39648965.val(e,c) function c39648965.val(e,c)
return Duel.GetMatchingGroupCount(c39648965.atkfilter,c:GetControler(),LOCATION_MZONE,0,c)*100 return Duel.GetMatchingGroupCount(c39648965.atkfilter,0,LOCATION_MZONE,LOCATION_MZONE,c)*100
end end
function c39648965.piercecon(e,tp,eg,ep,ev,re,r,rp) function c39648965.piercecon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
......
...@@ -26,7 +26,7 @@ end ...@@ -26,7 +26,7 @@ end
function c39978267.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c39978267.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then if chkc then
if e:GetLabel()==1 then return chkc:IsLocation(LOCATION_SZONE) and c39978267.desfilter(chkc) if e:GetLabel()==1 then return chkc:IsLocation(LOCATION_SZONE) and c39978267.desfilter(chkc)
else return chkc:IsLocation(LOCATION_SZONE) and c39978267.eqfilter(chkc) end else return chkc:IsLocation(LOCATION_SZONE) and c39978267.eqfilter(chkc,e:GetHandler()) end
end end
if chk==0 then return true end if chk==0 then return true end
local sel=0 local sel=0
...@@ -57,7 +57,7 @@ function c39978267.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +57,7 @@ function c39978267.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if sel==1 then if sel==1 then
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
else else
local c=e:GetHandler() local c=e:GetHandler()
...@@ -65,4 +65,4 @@ function c39978267.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,4 +65,4 @@ function c39978267.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Equip(tp,tc,e:GetHandler()) Duel.Equip(tp,tc,e:GetHandler())
end end
end end
end end
\ No newline at end of file
...@@ -5,7 +5,7 @@ function c44364207.initial_effect(c) ...@@ -5,7 +5,7 @@ function c44364207.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c44364207.indestg) e1:SetTarget(c44364207.indestg)
e1:SetValue(c44364207.indesval) e1:SetValue(c44364207.indesval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -119,14 +119,14 @@ function c4545683.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -119,14 +119,14 @@ function c4545683.eqop(e,tp,eg,ep,ev,re,r,rp)
else Duel.SendtoGrave(tc,REASON_EFFECT) end else Duel.SendtoGrave(tc,REASON_EFFECT) end
end end
end end
function c4545683.spfilter(c,e,tp) function c4545683.spfilter(c,e,tp,ec)
return c:GetFlagEffect(4545683)~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:GetFlagEffect(4545683)~=0 and c:GetEquipTarget()==ec and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c4545683.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c4545683.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c4545683.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c4545683.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c4545683.spfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c4545683.spfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c4545683.spop2(e,tp,eg,ep,ev,re,r,rp,chk) function c4545683.spop2(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -27,7 +27,7 @@ function c48576971.initial_effect(c) ...@@ -27,7 +27,7 @@ function c48576971.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c48576971.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c48576971.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c48576971.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
......
--仮面魔獣デス・ガーディウス
function c48948935.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c48948935.spcon)
e1:SetOperation(c48948935.spop)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(48948935,0))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c48948935.eqcon)
e2:SetTarget(c48948935.eqtg)
e2:SetOperation(c48948935.eqop)
c:RegisterEffect(e2)
end
function c48948935.spfilter(c)
local code=c:GetCode()
return code==13676474 or code==86569121
end
function c48948935.spcon(e,c)
if c==nil then return true end
local g=Duel.GetReleaseGroup(c:GetControler())
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-2
and g:GetCount()>1 and g:IsExists(c48948935.spfilter,1,nil)
end
function c48948935.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetReleaseGroup(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg1=g:FilterSelect(tp,c48948935.spfilter,1,1,nil)
g:RemoveCard(sg1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg2=g:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.Release(sg1,REASON_COST)
end
function c48948935.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c48948935.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end
function c48948935.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_DECK,0,1,1,nil,22610082)
local eqc=g:GetFirst()
if not eqc or not Duel.Equip(tp,eqc,tc,true) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c48948935.eqlimit)
e1:SetLabelObject(tc)
eqc:RegisterEffect(e1)
local e2=Effect.CreateEffect(eqc)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_SET_CONTROL)
e2:SetValue(1-tc:GetControler())
e2:SetReset(RESET_EVENT+0x1fe0000)
eqc:RegisterEffect(e2)
end
end
function c48948935.eqlimit(e,c)
return e:GetLabelObject()==c
end
...@@ -29,7 +29,7 @@ function c49587034.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,7 +29,7 @@ function c49587034.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_OPPO_TURN,4) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_OPPO_TURN,4)
e1:SetOperation(c49587034.tohand) e1:SetOperation(c49587034.tohand)
if cp~=e:GetHandlerPlayer() and ph~=DRAW_PHASE if cp~=e:GetHandlerPlayer() and ph~=PHASE_DRAW
then e1:SetLabel(2) then e1:SetLabel(2)
else e1:SetLabel(1) else e1:SetLabel(1)
end end
......
--ドラゴン族·封印の壺
function c50045299.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Pos Change
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SET_POSITION)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(c50045299.target)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetValue(POS_FACEUP_DEFENCE)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
c:RegisterEffect(e3)
end
function c50045299.target(e,c)
return c:IsRace(RACE_DRAGON)
end
--稲妻の剣
function c55226821.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c55226821.target)
e1:SetOperation(c55226821.operation)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(800)
c:RegisterEffect(e2)
--equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c55226821.eqlimit)
c:RegisterEffect(e3)
--atk down
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetTarget(c55226821.adtg)
e4:SetValue(-500)
c:RegisterEffect(e4)
end
function c55226821.adtg(e,c)
return c:IsAttribute(ATTRIBUTE_WATER)
end
function c55226821.eqlimit(e,c)
return c:IsRace(RACE_WARRIOR)
end
function c55226821.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR)
end
function c55226821.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c55226821.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c55226821.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c55226821.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c55226821.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
--不吉な占い
function c56995655.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e1)
--call & damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(56995655,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetProperty(EFFECT_FLAG_REPEAT)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCondition(c56995655.con)
e2:SetOperation(c56995655.op)
c:RegisterEffect(e2)
end
function c56995655.con(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c56995655.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1,nil)
local tc=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
local op=Duel.SelectOption(tp,70,71,72)
Duel.ConfirmCards(tp,tc)
Duel.ShuffleHand(1-tp)
if (op==0 and tc:IsType(TYPE_MONSTER)) or (op==1 and tc:IsType(TYPE_SPELL)) or (op==2 and tc:IsType(TYPE_TRAP)) then
Duel.Damage(1-tp,700,REASON_EFFECT)
end
end
...@@ -5,7 +5,7 @@ function c59380081.initial_effect(c) ...@@ -5,7 +5,7 @@ function c59380081.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetTarget(c59380081.target) e1:SetTarget(c59380081.target)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
...@@ -16,7 +16,7 @@ function c62633180.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -16,7 +16,7 @@ function c62633180.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp2) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,2)
end end
function c62633180.activate(e,tp,eg,ep,ev,re,r,rp) function c62633180.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -8,7 +8,7 @@ function c62782218.initial_effect(c) ...@@ -8,7 +8,7 @@ function c62782218.initial_effect(c)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_REPEAT) e1:SetProperty(EFFECT_FLAG_REPEAT)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_BATTLE)
e1:SetTarget(c62782218.destg) e1:SetTarget(c62782218.destg)
e1:SetOperation(c62782218.desop) e1:SetOperation(c62782218.desop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -16,16 +16,16 @@ function c63394872.initial_effect(c) ...@@ -16,16 +16,16 @@ function c63394872.initial_effect(c)
e2:SetOperation(c63394872.seqop) e2:SetOperation(c63394872.seqop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c63394872.filter(c) function c63394872.filter(c,tp)
local seq=c:GetSequence() local seq=c:GetSequence()
return (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)) return (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))
or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1))
end end
function c63394872.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c63394872.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c63394872.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c63394872.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c63394872.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c63394872.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(63394872,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(63394872,1))
Duel.SelectTarget(tp,c63394872.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c63394872.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end end
function c63394872.seqop(e,tp,eg,ep,ev,re,r,rp) function c63394872.seqop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
......
...@@ -78,9 +78,9 @@ function c64599569.dircon(e) ...@@ -78,9 +78,9 @@ function c64599569.dircon(e)
return e:GetHandler():GetAttackAnnouncedCount()>0 return e:GetHandler():GetAttackAnnouncedCount()>0
end end
function c64599569.atkcon(e) function c64599569.atkcon(e)
return e:GetHandler():GetAttackedCount()~=e:GetHandler():GetAttackedGroupCount() return e:GetHandler():IsDirectAttacked()
end end
function c64599569.tgop(e,tp,eg,ep,ev,re,r,rp) function c64599569.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,e:GetHandler()) local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,e:GetHandler())
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
...@@ -50,7 +50,7 @@ function c6733059.cost1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -50,7 +50,7 @@ function c6733059.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=cg:Select(tp,lv,lv,nil) local rg=cg:Select(tp,lv,lv,nil)
Duel.Remove(rg,POS_FACEUP,REASON_COST) Duel.Remove(rg,POS_FACEUP,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0)
e:SetLabel(lv) Duel.SetTargetParam(lv)
end end
end end
function c6733059.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c6733059.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -25,7 +25,7 @@ function c68875140.filter(c) ...@@ -25,7 +25,7 @@ function c68875140.filter(c)
return c:GetSequence()~=5 and c:IsAbleToHand() return c:GetSequence()~=5 and c:IsAbleToHand()
end end
function c68875140.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c68875140.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocatoin(LOCATION_SZONE) and chkc:IsControler(1-tp) and c68875140.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(1-tp) and c68875140.filter(chkc) end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c68875140.filter,tp,0,LOCATION_SZONE,1,1,nil) local g=Duel.SelectTarget(tp,c68875140.filter,tp,0,LOCATION_SZONE,1,1,nil)
......
...@@ -15,7 +15,7 @@ function c69069911.initial_effect(c) ...@@ -15,7 +15,7 @@ function c69069911.initial_effect(c)
end end
function c69069911.atcon(e,tp,eg,ep,ev,re,r,rp) function c69069911.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local bc=tc:GetBattleTarget() local bc=c:GetBattleTarget()
return bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER) and c:IsChainAttackable() return bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER) and c:IsChainAttackable()
end end
function c69069911.atcost(e,tp,eg,ep,ev,re,r,rp,chk) function c69069911.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -90,7 +90,7 @@ function c71645242.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -90,7 +90,7 @@ function c71645242.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(c71645242.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(c71645242.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local atk=g:GetSum(Card.GetAttack) local atk=g:GetSum(Card.GetAttack)
local sc=g:FilterCount(Card.IsControler,nil,tp) local sc=g:FilterCount(Card.IsControler,nil,tp)
if chk==0 then return g:GetCount()>0 and (sc>0 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0) if chk==0 then return e:GetHandler():IsDestructable(e) and g:GetCount()>0 and (Duel.GetLocationCount(tp,LOCATION_MZONE)>-sc)
and Duel.IsExistingMatchingCard(c71645242.filter2,tp,LOCATION_GRAVE,0,1,nil,atk,e,tp) end and Duel.IsExistingMatchingCard(c71645242.filter2,tp,LOCATION_GRAVE,0,1,nil,atk,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c71645242.filter2,tp,LOCATION_GRAVE,0,1,1,nil,atk,e,tp) local g=Duel.SelectTarget(tp,c71645242.filter2,tp,LOCATION_GRAVE,0,1,1,nil,atk,e,tp)
......
...@@ -27,7 +27,7 @@ function c72053645.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,7 +27,7 @@ function c72053645.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_BATTLE then if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_BATTLE then
e1:SetLabel(Duel.GetTurnCount()) e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c19763315.bpcon) e1:SetCondition(c72053645.bpcon)
e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_SELF_TURN,2) e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_SELF_TURN,2)
else else
e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_SELF_TURN,1) e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_SELF_TURN,1)
......
...@@ -25,7 +25,7 @@ function c72903645.filter(c) ...@@ -25,7 +25,7 @@ function c72903645.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end end
function c72903645.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c72903645.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsContreoler(1-tp) and c72903645.filter(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c72903645.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c72903645.filter,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(c72903645.filter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c72903645.filter,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,c72903645.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
......
--トリッキーズ·マジック4
function c75622824.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c75622824.cost)
e1:SetTarget(c75622824.target)
e1:SetOperation(c75622824.activate)
c:RegisterEffect(e1)
end
function c75622824.cfilter(c)
return c:IsFaceup() and c:IsCode(14778250) and c:IsAbleToGraveAsCost()
end
function c75622824.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c75622824.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c75622824.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c75622824.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)>0 end
local ct=Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ct,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct,0,0)
end
function c75622824.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<ct then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,75622825,0,0x4011,2000,1200,5,RACE_SPELLCASTER,ATTRIBUTE_WIND) then return end
for i=1,ct do
local token=Duel.CreateToken(tp,75622825)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e1:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e1,true)
end
Duel.SpecialSummonComplete()
end
...@@ -44,7 +44,7 @@ function c79106360.sp(e,tp,ct) ...@@ -44,7 +44,7 @@ function c79106360.sp(e,tp,ct)
local dt=g:GetCount() local dt=g:GetCount()
if dt==0 then return false end if dt==0 then return false end
local dlist={} local dlist={}
tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
if tc:IsType(TYPE_MONSTER) then dlist[tc:GetSequence()]=tc end if tc:IsType(TYPE_MONSTER) then dlist[tc:GetSequence()]=tc end
tc=g:GetNext() tc=g:GetNext()
...@@ -53,7 +53,7 @@ function c79106360.sp(e,tp,ct) ...@@ -53,7 +53,7 @@ function c79106360.sp(e,tp,ct)
local a=0 local a=0
local last=nil local last=nil
g=Group.CreateGroup() g=Group.CreateGroup()
while a<ct and i>0 do while a<ct and i>=0 do
tc=dlist[i] tc=dlist[i]
if tc then if tc then
g:AddCard(tc) g:AddCard(tc)
......
--悪魔の偵察者
function c81863068.initial_effect(c)
--flip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(81863068,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetTarget(c81863068.target)
e1:SetOperation(c81863068.operation)
c:RegisterEffect(e1)
end
function c81863068.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(3)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1)
end
function c81863068.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==0 then return end
local g=Duel.GetOperatedGroup()
Duel.ConfirmCards(1-p,g)
local dg=g:Filter(Card.IsType,nil,TYPE_SPELL)
Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD)
Duel.ShuffleHand(1-p)
end
--アスワンの亡霊
function c88236094.initial_effect(c)
--todeck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88236094,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c88236094.condition)
e1:SetTarget(c88236094.target)
e1:SetOperation(c88236094.operation)
c:RegisterEffect(e1)
end
function c88236094.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c88236094.filter(c)
return c:IsType(TYPE_TRAP) and c:IsAbleToDeck()
end
function c88236094.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c88236094.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c88236094.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c88236094.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c88236094.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
end
end
...@@ -31,7 +31,7 @@ end ...@@ -31,7 +31,7 @@ end
function c89801755.activate(e,tp,eg,ep,ev,re,r,rp) function c89801755.activate(e,tp,eg,ep,ev,re,r,rp)
local att=e:GetLabel() local att=e:GetLabel()
local p,rc=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,rc=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TO_GRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(p,c89801755.filter,p,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,rc,att) local g=Duel.SelectMatchingCard(p,c89801755.filter,p,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,rc,att)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
......
...@@ -25,7 +25,7 @@ function c9391354.filter(c) ...@@ -25,7 +25,7 @@ function c9391354.filter(c)
return c:IsDestructable() return c:IsDestructable()
end end
function c9391354.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9391354.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsContreoler(1-tp) and c9391354.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c9391354.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9391354.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c9391354.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c9391354.filter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c9391354.filter,tp,0,LOCATION_MZONE,1,1,nil)
......
...@@ -22,7 +22,7 @@ function c94374859.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,7 +22,7 @@ function c94374859.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and eg:GetFirst():GetControler()==tp return ep~=tp and eg:GetFirst():GetControler()==tp
end end
function c94374859.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c94374859.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocatoin(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToGrave() end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToGrave() end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,1,nil)
......
--怨霊の湿地帯
function c95220856.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--attack res
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c95220856.target)
c:RegisterEffect(e2)
end
function c95220856.target(e,c)
return c:IsStatus(STATUS_SUMMON_TURN)
end
...@@ -3,7 +3,7 @@ function c9637706.initial_effect(c) ...@@ -3,7 +3,7 @@ function c9637706.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE) e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SeRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetValue(c9637706.damval) e1:SetValue(c9637706.damval)
......
...@@ -25,20 +25,7 @@ function c96501677.cfilter(c) ...@@ -25,20 +25,7 @@ function c96501677.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_BEAST) return c:IsFaceup() and c:IsRace(RACE_BEAST)
end end
function c96501677.ccon(e) function c96501677.ccon(e)
return Duel.IsExistingMatchingCard(c96501677.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,e:GetHandler()) return Duel.IsExistingMatchingCard(c96501677.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
function c96501677.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and eg:GetFirst()~=e:GetHandler() and eg:GetFirst():IsRace(RACE_ROCK)
end
function c96501677.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(300)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300)
end
function c96501677.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end end
function c96501677.deftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c96501677.deftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsFaceup() and chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end if chkc then return chkc:IsFaceup() and chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end
......
...@@ -22,11 +22,11 @@ function c98792570.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,11 +22,11 @@ function c98792570.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if e:GetLabel()~=1 then return false end if e:GetLabel()~=1 then return false end
e:SetLabel(0) e:SetLabel(0)
return Duel.IsExistingMatchingCard(c98792570.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) return Duel.IsExistingMatchingCard(c98792570.cfilter,tp,LOCATION_MZONE,0,1,nil,e,tp)
end end
e:SetLabel(0) e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c98792570.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c98792570.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
Duel.SetTargetParam(g:GetFirst():GetTextAttack()) Duel.SetTargetParam(g:GetFirst():GetTextAttack())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
......
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