Commit f8db16ec authored by salix5's avatar salix5

Merge remote-tracking branch 'upstream/master' into patch-qli

parents 07ca4059 c2e55ce4
...@@ -5045,7 +5045,7 @@ int32 field::adjust_step(uint16 step) { ...@@ -5045,7 +5045,7 @@ int32 field::adjust_step(uint16 step) {
} }
case 8: { case 8: {
if(core.selfdes_disabled) { if(core.selfdes_disabled) {
core.units.begin()->step = 9; core.units.begin()->step = 10;
return FALSE; return FALSE;
} }
//self destroy //self destroy
...@@ -5081,6 +5081,39 @@ int32 field::adjust_step(uint16 step) { ...@@ -5081,6 +5081,39 @@ int32 field::adjust_step(uint16 step) {
return FALSE; return FALSE;
} }
case 9: { case 9: {
if(returns.ivalue[0] > 0)
core.re_adjust = TRUE;
//self tograve
uint8 tp = infos.turn_player;
effect* peffect;
card_set tograve_set;
for(uint8 p = 0; p < 2; ++p) {
for(uint8 i = 0; i < 5; ++i) {
card* pcard = player[tp].list_mzone[i];
if(pcard && pcard->is_position(POS_FACEUP) && (peffect = pcard->is_affected_by_effect(EFFECT_SELF_TOGRAVE))) {
tograve_set.insert(pcard);
pcard->current.reason_effect = peffect;
pcard->current.reason_player = peffect->get_handler_player();
}
}
for(uint8 i = 0; i < 8; ++i) {
card* pcard = player[tp].list_szone[i];
if(pcard && pcard->is_position(POS_FACEUP) && (peffect = pcard->is_affected_by_effect(EFFECT_SELF_TOGRAVE))) {
tograve_set.insert(pcard);
pcard->current.reason_effect = peffect;
pcard->current.reason_player = peffect->get_handler_player();
}
}
tp = 1 - tp;
}
if(tograve_set.size()) {
send_to(&tograve_set, 0, REASON_EFFECT, PLAYER_NONE, PLAYER_NONE, LOCATION_GRAVE, 0, POS_FACEUP);
} else {
returns.ivalue[0] = 0;
}
return FALSE;
}
case 10: {
if(returns.ivalue[0] > 0) if(returns.ivalue[0] > 0)
core.re_adjust = TRUE; core.re_adjust = TRUE;
//equip check //equip check
...@@ -5101,7 +5134,7 @@ int32 field::adjust_step(uint16 step) { ...@@ -5101,7 +5134,7 @@ int32 field::adjust_step(uint16 step) {
} }
return FALSE; return FALSE;
} }
case 10: { case 11: {
//position //position
uint32 tp = infos.turn_player, pos; uint32 tp = infos.turn_player, pos;
card* pcard; card* pcard;
...@@ -5139,7 +5172,7 @@ int32 field::adjust_step(uint16 step) { ...@@ -5139,7 +5172,7 @@ int32 field::adjust_step(uint16 step) {
} }
return FALSE; return FALSE;
} }
case 11: { case 12: {
//shuffle check //shuffle check
for(uint32 i = 0; i < player[0].list_hand.size(); ++i) { for(uint32 i = 0; i < player[0].list_hand.size(); ++i) {
card* pcard = player[0].list_hand[i]; card* pcard = player[0].list_hand[i];
...@@ -5161,7 +5194,7 @@ int32 field::adjust_step(uint16 step) { ...@@ -5161,7 +5194,7 @@ int32 field::adjust_step(uint16 step) {
shuffle(1 - infos.turn_player, LOCATION_HAND); shuffle(1 - infos.turn_player, LOCATION_HAND);
return FALSE; return FALSE;
} }
case 12: { case 13: {
//reverse_deck && remove brainwashing //reverse_deck && remove brainwashing
effect_set eset; effect_set eset;
uint32 res = 0; uint32 res = 0;
...@@ -5218,19 +5251,19 @@ int32 field::adjust_step(uint16 step) { ...@@ -5218,19 +5251,19 @@ int32 field::adjust_step(uint16 step) {
} }
return FALSE; return FALSE;
} }
case 13: { case 14: {
//attack cancel //attack cancel
card* attacker = core.attacker; card* attacker = core.attacker;
if(attacker && attacker->is_affected_by_effect(EFFECT_CANNOT_ATTACK)) if(attacker && attacker->is_affected_by_effect(EFFECT_CANNOT_ATTACK))
attacker->set_status(STATUS_ATTACK_CANCELED, TRUE); attacker->set_status(STATUS_ATTACK_CANCELED, TRUE);
return FALSE; return FALSE;
} }
case 14: { case 15: {
raise_event((card*)0, EVENT_ADJUST, 0, 0, PLAYER_NONE, PLAYER_NONE, 0); raise_event((card*)0, EVENT_ADJUST, 0, 0, PLAYER_NONE, PLAYER_NONE, 0);
process_instant_event(); process_instant_event();
return FALSE; return FALSE;
} }
case 15: { case 16: {
if(core.re_adjust) { if(core.re_adjust) {
core.units.begin()->step = -1; core.units.begin()->step = -1;
return FALSE; return FALSE;
......
...@@ -32,11 +32,11 @@ function c20426907.initial_effect(c) ...@@ -32,11 +32,11 @@ function c20426907.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--tograve --tograve
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EVENT_ADJUST) e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_SZONE) e5:SetRange(LOCATION_SZONE)
e5:SetCode(EFFECT_SELF_TOGRAVE)
e5:SetCondition(c20426907.sdcon) e5:SetCondition(c20426907.sdcon)
e5:SetOperation(c20426907.sdop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c20426907.filter(c) function c20426907.filter(c)
...@@ -89,7 +89,7 @@ function c20426907.disfilter(c,e) ...@@ -89,7 +89,7 @@ function c20426907.disfilter(c,e)
return c:IsFaceup() and c:IsRelateToEffect(e) return c:IsFaceup() and c:IsRelateToEffect(e)
end end
function c20426907.disop(e,tp,eg,ep,ev,re,r,rp) function c20426907.disop(e,tp,eg,ep,ev,re,r,rp)
if c20426907.sdcon(e,tp,eg,ep,ev,re,r,rp) then return end if c20426907.sdcon(e) then return end
if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c20426907.disfilter,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c20426907.disfilter,nil,e)
local tc=g:GetFirst() local tc=g:GetFirst()
...@@ -121,9 +121,6 @@ end ...@@ -121,9 +121,6 @@ end
function c20426907.sdfilter(c) function c20426907.sdfilter(c)
return c:IsFaceup() and c:IsSetCard(0xaa) and not c:IsCode(20426907) return c:IsFaceup() and c:IsSetCard(0xaa) and not c:IsCode(20426907)
end end
function c20426907.sdcon(e,tp,eg,ep,ev,re,r,rp) function c20426907.sdcon(e)
return not Duel.IsExistingMatchingCard(c20426907.sdfilter,tp,LOCATION_ONFIELD,0,1,nil) return not Duel.IsExistingMatchingCard(c20426907.sdfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
function c20426907.sdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end end
--超重神鬼シュテンドウ-G
function c36953371.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),aux.NonTuner(Card.IsSetCard,0x9a),1)
c:EnableReviveLimit()
--defence attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DEFENCE_ATTACK)
e1:SetValue(1)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c36953371.descon)
e2:SetTarget(c36953371.destg)
e2:SetOperation(c36953371.desop)
c:RegisterEffect(e2)
end
function c36953371.descon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP)
end
function c36953371.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
function c36953371.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c36953371.filter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c36953371.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c36953371.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c36953371.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
--デストーイ・シザー・タイガー
function c464362.initial_effect(c)
c:SetUniqueOnField(1,0,464362)
--fusion material
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_FUSION_MATERIAL)
e1:SetCondition(c464362.fscon)
e1:SetOperation(c464362.fsop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c464362.descon)
e2:SetTarget(c464362.destg)
e2:SetOperation(c464362.desop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xad))
e3:SetValue(c464362.atkval)
c:RegisterEffect(e3)
end
c464362.material_count=1
c464362.material={30068120}
function c464362.mfilter(c,mg)
return (c:IsCode(30068120) or c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)) and mg:IsExists(Card.IsSetCard,1,c,0xa9)
end
function c464362.fscon(e,mg,gc)
if mg==nil then return false end
if gc then return (gc:IsCode(30068120) or gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE))
and mg:IsExists(Card.IsSetCard,1,gc,0xa9) end
return mg:IsExists(c464362.mfilter,1,nil,mg)
end
function c464362.fsop(e,tp,eg,ep,ev,re,r,rp,gc)
if gc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g1=eg:FilterSelect(tp,Card.IsSetCard,1,63,nil,0xa9)
Duel.SetFusionMaterial(g1)
return
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g1=eg:FilterSelect(tp,c464362.mfilter,1,1,nil,eg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g2=eg:FilterSelect(tp,Card.IsSetCard,1,63,g1:GetFirst(),0xa9)
g1:Merge(g2)
Duel.SetFusionMaterial(g1)
end
function c464362.descon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c464362.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsDestructable() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local ct=e:GetHandler():GetMaterialCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c464362.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.Destroy(g,REASON_EFFECT)
end
function c464362.atkfilter(c)
return c:IsFaceup() and (c:IsSetCard(0xa9) or c:IsSetCard(0xad))
end
function c464362.atkval(e,c)
return Duel.GetMatchingGroupCount(c464362.atkfilter,c:GetControler(),LOCATION_MZONE,0,nil)*300
end
--EMペンデュラム・マジシャン
function c47075569.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c47075569.atkcon)
e2:SetOperation(c47075569.atkop)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,47075569)
e3:SetTarget(c47075569.thtg)
e3:SetOperation(c47075569.thop)
c:RegisterEffect(e3)
end
function c47075569.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x9f) and c:IsControler(tp) and c:GetSummonType()==SUMMON_TYPE_PENDULUM
end
function c47075569.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c47075569.cfilter,1,nil,tp)
end
function c47075569.filter(c)
return c:IsFaceup() and c:IsSetCard(0x9f)
end
function c47075569.atkop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c47075569.filter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c47075569.thfilter(c)
return c:IsSetCard(0x9f) and c:IsType(TYPE_MONSTER) and not c:IsCode(47075569) and c:IsAbleToHand()
end
function c47075569.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and chkc:IsDestructable() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(c47075569.thfilter,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.GetMatchingGroup(c47075569.thfilter,tp,LOCATION_DECK,0,nil)
local ct=g:GetClassCount(Card.GetCode)
if ct>2 then ct=2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,dg:GetCount(),tp,LOCATION_DECK)
end
function c47075569.thop(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local ct=Duel.Destroy(dg,REASON_EFFECT)
local g=Duel.GetMatchingGroup(c47075569.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()==0 then return end
if ct>g:GetClassCount(Card.GetCode) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=g:Select(tp,1,1,nil)
if ct==2 then
g:Remove(Card.IsCode,nil,g1:GetFirst():GetCode())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=g:Select(tp,1,1,nil)
g1:Merge(g2)
end
Duel.SendtoHand(g1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g1)
end
...@@ -44,7 +44,7 @@ function c49919798.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,7 @@ function c49919798.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c49919798.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c49919798.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(49919798)==0 end if chk==0 then return e:GetHandler():GetFlagEffect(49919798)==0 end
e:GetHandler():RegisterFlagEffect(49919798,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(49919798,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end end
......
--RR-フォース・ストリクス
function c73347079.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--atk/def
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(c73347079.adval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(c73347079.thcost)
e3:SetTarget(c73347079.thtg)
e3:SetOperation(c73347079.thop)
c:RegisterEffect(e3)
end
function c73347079.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WINDBEAST)
end
function c73347079.adval(e,c)
return Duel.GetMatchingGroupCount(c73347079.filter,c:GetControler(),LOCATION_MZONE,0,c)*500
end
function c73347079.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c73347079.thfilter(c)
return c:GetLevel()==4 and c:IsRace(RACE_WINDBEAST) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand()
end
function c73347079.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c73347079.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c73347079.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c73347079.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--DDD壊薙王アビス・ラグナロク
function c74069667.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,74069667)
e2:SetCondition(c74069667.spcon1)
e2:SetTarget(c74069667.sptg1)
e2:SetOperation(c74069667.spop1)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,74069668)
e3:SetTarget(c74069667.sptg2)
e3:SetOperation(c74069667.spop2)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
--remove
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCost(c74069667.rmcost)
e5:SetTarget(c74069667.rmtg)
e5:SetOperation(c74069667.rmop)
c:RegisterEffect(e5)
end
function c74069667.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xaf) and c:GetSummonPlayer()==tp
end
function c74069667.spcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c74069667.cfilter,1,nil,tp)
end
function c74069667.spfilter1(c,e,tp)
return c:IsSetCard(0xaf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c74069667.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c74069667.spfilter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c74069667.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c74069667.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,1000)
end
function c74069667.spop1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Damage(tp,1000,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(c74069667.val)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c74069667.val(e,re,dam,r,rp,rc)
if bit.band(r,REASON_BATTLE)~=0 then
return dam/2
else return dam end
end
function c74069667.spfilter2(c,e,tp)
return c:IsSetCard(0x10af) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c74069667.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c74069667.spfilter2(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c74069667.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c74069667.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c74069667.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c74069667.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,e:GetHandler(),0xaf) end
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,e:GetHandler(),0xaf)
Duel.Release(g,REASON_COST)
end
function c74069667.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c74069667.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
...@@ -22,11 +22,11 @@ function c94432298.initial_effect(c) ...@@ -22,11 +22,11 @@ function c94432298.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--tograve --tograve
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_ADJUST) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCode(EFFECT_SELF_TOGRAVE)
e3:SetCondition(c94432298.sdcon) e3:SetCondition(c94432298.sdcon)
e3:SetOperation(c94432298.sdop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c94432298.tgtg1(e,tp,eg,ep,ev,re,r,rp,chk) function c94432298.tgtg1(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -56,7 +56,7 @@ function c94432298.tgtg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -56,7 +56,7 @@ function c94432298.tgtg2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
function c94432298.tgop(e,tp,eg,ep,ev,re,r,rp) function c94432298.tgop(e,tp,eg,ep,ev,re,r,rp)
if c94432298.sdcon(e,tp,eg,ep,ev,re,r,rp) then return end if c94432298.sdcon(e) then return end
if e:GetHandler():GetFlagEffect(94432298)==0 then return end if e:GetHandler():GetFlagEffect(94432298)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c94432298.filter,tp,LOCATION_DECK,0,1,2,nil) local g=Duel.SelectMatchingCard(tp,c94432298.filter,tp,LOCATION_DECK,0,1,2,nil)
...@@ -67,9 +67,6 @@ end ...@@ -67,9 +67,6 @@ end
function c94432298.sdfilter(c) function c94432298.sdfilter(c)
return c:IsFacedown() or not c:IsSetCard(0xbb) return c:IsFacedown() or not c:IsSetCard(0xbb)
end end
function c94432298.sdcon(e,tp,eg,ep,ev,re,r,rp) function c94432298.sdcon(e)
return Duel.IsExistingMatchingCard(c94432298.sdfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c94432298.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c94432298.sdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end end
...@@ -380,6 +380,7 @@ EFFECT_UPDATE_RSCALE =136 --改变右刻度 ...@@ -380,6 +380,7 @@ EFFECT_UPDATE_RSCALE =136 --改变右刻度
EFFECT_CHANGE_RSCALE =137 --设置右刻度 EFFECT_CHANGE_RSCALE =137 --设置右刻度
EFFECT_SET_POSITION =140 --改变表示形式 EFFECT_SET_POSITION =140 --改变表示形式
EFFECT_SELF_DESTROY =141 --自灭(罪系列等) EFFECT_SELF_DESTROY =141 --自灭(罪系列等)
EFFECT_SELF_TOGRAVE =142 --
EFFECT_DOUBLE_TRIBUTE =150 --可以作为2个祭品 EFFECT_DOUBLE_TRIBUTE =150 --可以作为2个祭品
EFFECT_DECREASE_TRIBUTE =151 --减少祭品 EFFECT_DECREASE_TRIBUTE =151 --减少祭品
EFFECT_DECREASE_TRIBUTE_SET =152 --减少放置怪兽的祭品 EFFECT_DECREASE_TRIBUTE_SET =152 --减少放置怪兽的祭品
......
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