Commit 379eb15f authored by argon.sun's avatar argon.sun

fix

parent 1c94ecfb
......@@ -147,8 +147,7 @@ void Game::DrawCards() {
for(int i = 0; i < dField.extra[p].size(); ++i)
DrawCard(dField.extra[p][i]);
}
std::set<ClientCard*>::iterator cit;
for(cit = dField.overlay_cards.begin(); cit != dField.overlay_cards.end(); ++cit)
for(auto cit = dField.overlay_cards.begin(); cit != dField.overlay_cards.end(); ++cit)
DrawCard(*cit);
}
void Game::DrawCard(ClientCard* pcard) {
......
......@@ -750,6 +750,9 @@ void Game::ClearTextures() {
imageManager.ClearTexture();
}
void Game::CloseDuelWindow() {
for(auto wit = fadingList.begin(); wit != fadingList.end(); ++wit)
wit->guiFading->setRelativePosition(wit->fadingSize);
fadingList.clear();
wACMessage->setVisible(false);
wANAttribute->setVisible(false);
wANCard->setVisible(false);
......@@ -766,7 +769,7 @@ void Game::CloseDuelWindow() {
wPhase->setVisible(false);
wPosSelect->setVisible(false);
wQuery->setVisible(false);
wReplayControl->setVisible(false);
wReplay->setVisible(false);
stHintMsg->setVisible(false);
btnSideOK->setVisible(false);
btnLeaveGame->setVisible(false);
......
......@@ -5,6 +5,8 @@ function c21598948.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetTarget(c21598948.atktg1)
e1:SetOperation(c21598948.atkop)
c:RegisterEffect(e1)
--atk change
local e2=Effect.CreateEffect(c)
......@@ -14,7 +16,7 @@ function c21598948.initial_effect(c)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c21598948.atkcon)
e2:SetTarget(c21598948.atktg)
e2:SetTarget(c21598948.atktg2)
e2:SetOperation(c21598948.atkop)
c:RegisterEffect(e2)
--maintain
......@@ -30,13 +32,23 @@ end
function c21598948.atkcon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function c21598948.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
function c21598948.atktg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetLabel(0)
if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and tp~=Duel.GetTurnPlayer() then
e:SetLabel(1)
Duel.SetTargetCard(Duel.GetAttacker())
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
end
end
function c21598948.atktg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetLabel(1)
Duel.SetTargetCard(Duel.GetAttacker())
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
end
function c21598948.atkop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end
local a=Duel.GetAttacker()
if not a:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(21598948,4))
......
......@@ -5,27 +5,19 @@ function c40640057.initial_effect(c)
e1:SetDescription(aux.Stringid(40640057,0))
e1:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetCondition(c40640057.con)
e1:SetCost(c40640057.cost)
e1:SetOperation(c40640057.op)
c:RegisterEffect(e1)
end
function c40640057.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetAttacker():GetAttack()>0
return Duel.GetTurnPlayer()~=tp and ep==tp
end
function c40640057.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c40640057.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
Duel.ChangeBattleDamage(ep,0)
end
......@@ -20,7 +20,7 @@ function c50091196.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetHintTiming(0,0x1c0+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c50091196.sccon)
e2:SetTarget(c50091196.sctarg)
......
......@@ -21,7 +21,7 @@ function c55375684.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c55375684.filter(c,e,tp)
return c:IsSetCard(0x18) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsLevelBelow(4) and c:IsSetCard(0x18) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c55375684.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -34,15 +34,7 @@ function c60953118.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c60953118.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
Duel.ChangeBattleDamage(ep,0)
end
function c60953118.cointg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -31,7 +31,7 @@ function c98558751.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetHintTiming(0,0x1c0+TIMING_MAIN_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c98558751.sccon)
e3:SetTarget(c98558751.sctg)
......
......@@ -3,9 +3,9 @@
antialias = 2
nickname = Player
gamename = Game
lastdeck = chaosls
lastdeck = test
textfont = c:/windows/fonts/simsun.ttc 14
numfont = c:/windows/fonts/arialbd.ttf
serverport = 7911
lastip = 192.168.3.235
lastip = 192.168.2.100
lastport = 7911
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