Commit 703095c2 authored by VanillaSalt's avatar VanillaSalt

fix

parent 94b7be80
This diff is collapsed.
......@@ -3397,7 +3397,7 @@ int32 field::process_battle_command(uint16 step) {
core.attacker->set_status(STATUS_BATTLE_DESTROYED, FALSE);
if(core.attacker->is_position(POS_FACEUP_DEFENCE)) {
effect* defattack = core.attacker->is_affected_by_effect(EFFECT_DEFENCE_ATTACK);
if(defattack && defattack->get_value(core.attacker) == 1)
if(defattack && defattack->get_value(core.attacker))
a = ad;
}
if(core.attack_target) {
......
......@@ -23,7 +23,10 @@ function c402568.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(1)
e1:SetValue(c402568.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c402568.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
......@@ -18,7 +18,7 @@ function c46897277.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(1)
e1:SetValue(c46897277.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
......@@ -29,3 +29,6 @@ function c46897277.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetTargetRange(0,1)
Duel.RegisterEffect(e2,tp)
end
function c46897277.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
......@@ -53,7 +53,7 @@ end
function c52665542.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local cc=e:GetLabelObject()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c52665542.tgfilter(chkc) and chkc~=cc end
if chk==0 then return Duel.IsExistingTarget(c52665542.tgfilter,tp,LOCATION_GRAVE,0,1,cc) end
if chk==0 then return Duel.IsExistingTarget(c52665542.tgfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,c52665542.tgfilter,tp,LOCATION_GRAVE,0,1,1,cc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
......
......@@ -17,13 +17,16 @@ function c67985943.initial_effect(c)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,1)
e3:SetValue(1)
e3:SetValue(c67985943.aclimit)
e3:SetCondition(c67985943.actcon)
c:RegisterEffect(e3)
end
function c67985943.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c67985943.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c67985943.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
......@@ -11,7 +11,7 @@ function c69155991.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetCode(EVENT_CHAIN_END)
e2:SetOperation(c69155991.desop1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
......@@ -36,16 +36,18 @@ function c69155991.initial_effect(c)
end
function c69155991.chop(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:GetHandler():IsType(TYPE_MONSTER) then
e:GetHandler():RegisterFlagEffect(69155991,RESET_EVENT+0x1fe0000+RESET_CHAIN,0,1)
e:GetHandler():RegisterFlagEffect(69155991,RESET_EVENT+0x1ff0000+RESET_PHASE+RESET_END,0,1)
end
end
function c69155991.desop1(e,tp,eg,ep,ev,re,r,rp)
if ev>1 or e:GetHandler():GetFlagEffect(69155991)==0 then return end
local c=e:GetHandler()
if c:GetFlagEffect(69155991)==0 then return end
c:ResetFlagEffect(69155991)
local ph=Duel.GetCurrentPhase()
if (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and not Duel.IsDamageCalculated() then
e:GetHandler():RegisterFlagEffect(69155992,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_DAMAGE,0,1)
c:RegisterFlagEffect(69155992,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_DAMAGE,0,1)
else
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
Duel.Destroy(c,REASON_EFFECT)
end
end
function c69155991.desop2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -10,10 +10,13 @@ function c88033975.initial_effect(c)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1)
e1:SetValue(1)
e1:SetValue(c88033975.aclimit)
e1:SetCondition(c88033975.actcon)
c:RegisterEffect(e1)
end
function c88033975.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c88033975.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
......@@ -13,21 +13,21 @@ function c9287078.initial_effect(c)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c9287078.filter1(c,e,tp)
return c:GetSummonPlayer()==1-tp and c:IsCanBeEffectTarget(e)
and Duel.IsExistingTarget(c9287078.filter2,tp,LOCATION_MZONE,0,1,c)
end
function c9287078.filter2(c)
function c9287078.filter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER)
end
function c9287078.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return eg:IsExists(c9287078.filter1,1,nil,e,tp) end
if chk==0 then
local ec=eg:GetFirst()
return eg:GetCount()==1 and ec:GetSummonPlayer()==1-tp and ec:IsCanBeEffectTarget(e)
and Duel.IsExistingTarget(c9287078.filter,tp,LOCATION_MZONE,0,1,ec)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=eg:FilterSelect(tp,c9287078.filter1,1,1,nil,e,tp)
local g1=eg:Select(tp,1,1,nil)
Duel.SetTargetCard(g1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectTarget(tp,c9287078.filter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst())
local g2=Duel.SelectTarget(tp,c9287078.filter,tp,LOCATION_MZONE,0,1,1,g1:GetFirst())
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,2,0,0)
end
......@@ -36,10 +36,8 @@ function c9287078.spfilter(c,e,tp)
and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c9287078.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc1=g:GetFirst()
local tc2=g:GetNext()
if tc1:IsRelateToEffect(e) and tc2:IsRelateToEffect(e) and Duel.SendtoGrave(g,REASON_EFFECT)==2 then
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if Duel.SendtoGrave(g,REASON_EFFECT)==2 and g:IsExists(Card.IsLocation,2,nil,LOCATION_GRAVE) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local sg=Duel.GetMatchingGroup(c9287078.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9287078,0)) then
......
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