Commit 355231c8 authored by VanillaSalt's avatar VanillaSalt

fix

parent 0e32cdfd
......@@ -448,20 +448,20 @@ void card::calc_attack_defence(int32 *patk, int32 *pdef) {
uint32 base_atk = get_base_attack();
uint32 base_def = get_base_defence();
temp.base_attack = base_atk;
temp.attack = base_atk;
temp.base_defence = base_def;
temp.defence = base_def;
int32 up_atk = 0, upc_atk = 0;
int32 up_def = 0, upc_def = 0;
effect_set eset;
filter_effect(EFFECT_SWAP_AD, &eset, FALSE);
int32 swap = eset.size();
if(swap || patk) {
temp.attack = base_atk;
filter_effect(EFFECT_UPDATE_ATTACK, &eset, FALSE);
filter_effect(EFFECT_SET_ATTACK, &eset, FALSE);
filter_effect(EFFECT_SET_ATTACK_FINAL, &eset, FALSE);
}
if(swap || pdef) {
temp.defence = base_def;
filter_effect(EFFECT_UPDATE_DEFENCE, &eset, FALSE);
filter_effect(EFFECT_SET_DEFENCE, &eset, FALSE);
filter_effect(EFFECT_SET_DEFENCE_FINAL, &eset, FALSE);
......@@ -527,11 +527,15 @@ void card::calc_attack_defence(int32 *patk, int32 *pdef) {
break;
}
if (!rev) {
temp.attack = base_atk + up_atk + upc_atk;
temp.defence = base_def + up_def + upc_def;
if (temp.attack != -1)
temp.attack = base_atk + up_atk + upc_atk;
if (temp.defence != -1)
temp.defence = base_def + up_def + upc_def;
} else {
temp.attack = base_atk - up_atk - upc_atk;
temp.defence = base_def - up_def - upc_def;
if (temp.attack != -1)
temp.attack = base_atk - up_atk - upc_atk;
if (temp.defence != -1)
temp.defence = base_def - up_def - upc_def;
}
}
if (swap_final) {
......
......@@ -27,6 +27,7 @@ function c37745740.initial_effect(c)
end
function c37745740.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x9f) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x9f)
e:SetLabel(g:GetFirst():GetLevel()*100)
Duel.Release(g,REASON_COST)
......@@ -43,6 +44,7 @@ function c37745740.operation(e,tp,eg,ep,ev,re,r,rp)
end
function c37745740.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x9f) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x9f)
e:SetLabelObject(g:GetFirst())
Duel.Release(g,REASON_COST)
......
......@@ -23,9 +23,10 @@ function c63323539.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=eg:FilterSelect(tp,c63323539.filter,1,1,nil,e,tp)
local tc=g:GetFirst()
if not tc then return end
local atk=tc:GetAttack()
if atk<0 or tc:IsFacedown() then atk=0 end
if tc and Duel.Destroy(tc,REASON_EFFECT)~=0 then
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
......@@ -47,11 +47,11 @@ function c81907872.posop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c81907872.cfilter1(c,tp)
return c:IsControler(tp) and c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY+REASON_EFFECT) and c:IsSetCard(0x8d) and c:IsType(TYPE_MONSTER)
and not c:IsPreviousLocation(LOCATION_SZONE)
return c:IsControler(tp) and c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT)
and c:IsSetCard(0x8d) and c:IsType(TYPE_MONSTER) and not c:IsPreviousLocation(LOCATION_SZONE)
end
function c81907872.cfilter2(c)
return c:IsReason(REASON_BATTLE) and c:IsStatus(STATUS_OPPO_BATTLE) and c==Duel.GetAttackTarget()
return c:IsReason(REASON_BATTLE) and c:IsStatus(STATUS_OPPO_BATTLE) and c==Duel.GetAttackTarget()
end
function c81907872.spcon(e,tp,eg,ep,ev,re,r,rp)
return (rp~=tp and eg:IsExists(c81907872.cfilter1,1,nil,tp)) or eg:IsExists(c81907872.cfilter2,1,nil)
......
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