Commit fa5bebf7 authored by salix5's avatar salix5

Merge branch 'master' into patch

parents 9efef58d 0119ea38
......@@ -1693,6 +1693,9 @@ int32 field::check_xyz_material(card* scard, int32 findex, int32 min, int32 max,
auto iter = core.xmaterial_lst.begin();
while((iter != core.xmaterial_lst.end()) && ((iter->first > core.xmaterial_lst.size()) || (iter->first > max)))
core.xmaterial_lst.erase(iter++);
} else {
for(auto pcard : cv)
core.xmaterial_lst.insert(std::make_pair(0, pcard));
}
} else {
pduel->game_field->get_xyz_material(scard, findex, max);
......
......@@ -38,7 +38,7 @@ function c18027138.activate(e,tp,eg,ep,ev,re,r,rp)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(1,0)
e3:SetAbsoluteRange(tp,1,0)
e3:SetTarget(c18027138.splimit)
e3:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e3)
......
......@@ -52,6 +52,7 @@ function c2095764.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
function c2095764.sccon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then return false end
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_BATTLE or ph==PHASE_MAIN2
end
......
......@@ -9,7 +9,7 @@ function c29143726.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CHAIN_UNIQUE)
e1:SetCountLimit(1,29143726)
e1:SetCondition(c29143726.spcon1)
e1:SetTarget(c29143726.sptg)
......
......@@ -52,6 +52,7 @@ function c30106950.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end
function c30106950.sccon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then return false end
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_BATTLE or ph==PHASE_MAIN2
end
......
......@@ -10,7 +10,7 @@ function c33698022.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CHAIN_UNIQUE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCost(c33698022.thcost)
e1:SetCountLimit(1,33698022)
e1:SetTarget(c33698022.thtg)
e1:SetOperation(c33698022.thop)
c:RegisterEffect(e1)
......@@ -21,8 +21,8 @@ function c33698022.initial_effect(c)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CHAIN_UNIQUE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,33698022)
e2:SetCondition(c33698022.thcon)
e2:SetCost(c33698022.thcost)
e2:SetTarget(c33698022.thtg)
e2:SetOperation(c33698022.thop)
c:RegisterEffect(e2)
......@@ -33,10 +33,6 @@ end
function c33698022.thcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c33698022.cfilter,1,nil,1-tp)
end
function c33698022.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,33698022)==0 end
Duel.RegisterFlagEffect(tp,33698022,RESET_PHASE+PHASE_END,0,1)
end
function c33698022.filter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and c:IsAbleToHand()
end
......
......@@ -52,6 +52,7 @@ function c35089369.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
function c35089369.sccon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then return false end
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_BATTLE or ph==PHASE_MAIN2
end
......
......@@ -7,7 +7,6 @@ function c43577607.initial_effect(c)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
......@@ -62,8 +61,11 @@ function c43577607.initial_effect(c)
e6:SetLabel(5)
c:RegisterEffect(e6)
end
function c43577607.effcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x9e)
function c43577607.confilter(c)
return c:IsSetCard(0x9e) and c:IsType(TYPE_MONSTER)
end
function c43577607.effcon(e)
local g=Duel.GetMatchingGroup(c43577607.confilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil)
return g:GetClassCount(Card.GetAttribute)>=e:GetLabel()
end
function c43577607.atktg(e,c)
......@@ -74,7 +76,7 @@ function c43577607.repfilter(c,tp)
end
function c43577607.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c43577607.repfilter,1,nil,tp) end
return Duel.SelectYesNo(tp,aux.Stringid(43577607,0))
return Duel.SelectYesNo(tp,aux.Stringid(43577607,1))
end
function c43577607.repval(e,c)
return c43577607.repfilter(c,e:GetHandlerPlayer())
......
......@@ -29,7 +29,7 @@ function c53466826.activate(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetAttack()*2)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
tc:RegisterEffect(e1)
......
......@@ -52,6 +52,7 @@ function c66500065.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end
function c66500065.sccon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then return false end
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_BATTLE or ph==PHASE_MAIN2
end
......
......@@ -49,16 +49,16 @@ function c69327790.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local g1=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
local g2=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
local mg=e:GetHandler():GetMaterial()
if mg:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WIND)
and Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,g1:GetFirst())
and Duel.SelectYesNo(tp,aux.Stringid(69327790,2)) then
e:SetLabel(1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g3=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1:GetFirst())
local g3=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g3,1,0,0)
else
e:SetLabel(0)
......
......@@ -23,10 +23,10 @@ function c77723643.initial_effect(c)
c:RegisterEffect(e2)
end
function c77723643.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) end
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c77723643.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -36,13 +36,13 @@ function c79967395.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(def)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENCE_FINAL)
e2:SetValue(atk)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
......@@ -14,7 +14,7 @@ function c91110378.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c91110378.spcon)
e2:SetTarget(c91110378.sptg)
......@@ -43,6 +43,7 @@ function c91110378.spop(e,tp,eg,ep,ev,re,r,rp)
local dc=Duel.GetOperatedGroup():GetFirst()
if dc:IsSetCard(0x86) and dc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(91110378,1)) then
Duel.BreakEffect()
Duel.SpecialSummon(dc,0,tp,tp,false,false,POS_FACEUP)
end
end
......
......@@ -22,8 +22,8 @@ function c96471335.initial_effect(c)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CHAIN_UNIQUE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,96471335)
e2:SetCondition(c96471335.rmcon)
e2:SetCost(c96471335.rmcost)
e2:SetTarget(c96471335.rmtg)
e2:SetOperation(c96471335.rmop)
c:RegisterEffect(e2)
......@@ -53,10 +53,6 @@ function c96471335.rmcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
return tc:IsType(TYPE_NORMAL) and tc:IsRace(RACE_SPELLCASTER)
end
function c96471335.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,96471335)==0 end
Duel.RegisterFlagEffect(tp,96471335,RESET_PHASE+PHASE_END,0,1)
end
function c96471335.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
......
......@@ -427,4 +427,4 @@
!counter 0x2d 指示物(踢火)
!counter 0x2e 鲨指示物
!counter 0x2f 南瓜指示物
!counter 0x30 ???指示物
!counter 0x30 毅飞冲天指示物
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