Authored Unity primitive/object-model shim, VFX layer (control-flow-preserving, InstantVfx never invokes its action -- headless suppression), god-object stubs (GameMgr/EffectMgr/UIManager with faithfully-extracted nested enums), View/UI/Touch tree, LitJson+BetterList+Tuple copied, third-party stubs. Discovered Roslyn header-error masking: fixing class-header type errors unmasks body references, so the true copy closure is ~2570 files (was 782 under masking). Errors: masked-25720 -> 268; our shim files compile clean. Remaining: ~50 residual shim/external types, 24 NGUI UI-base overrides, static-type fixes, plus likely 1-2 more unmask waves.
58 lines
2.2 KiB
C#
58 lines
2.2 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Wizard.Battle.View.Vfx;
|
|
|
|
public class NetworkSkill_powerup : Skill_powerup
|
|
{
|
|
public NetworkSkill_powerup(SkillParameter skillPrm, string option)
|
|
: base(skillPrm, option)
|
|
{
|
|
}
|
|
|
|
protected override void IncrementGameBuffCount(List<BattleCardBase> inplayTargetCards)
|
|
{
|
|
base.IncrementGameBuffCount(inplayTargetCards);
|
|
if (inplayTargetCards.Any())
|
|
{
|
|
(base.SkillPrm.selfBattlePlayer.BattleMgr as NetworkBattleManagerBase).RegisterActionManager.Add(new RegisterPlayerParameter(RegisterActionBase.ActionBaseParameter.buffUnit, 1, base.SkillPrm.selfBattlePlayer.IsPlayer));
|
|
}
|
|
}
|
|
|
|
public override VfxWithLoading Stop(SkillProcessor skillProcessor)
|
|
{
|
|
base.SkillPrm.ownerCard.SelfBattlePlayer.CallOnDeprivePowerUp(_targetList);
|
|
return base.Stop(skillProcessor);
|
|
}
|
|
|
|
protected override VfxBase GiveCombatModifier(BattleCardBase card, ICardOffenseModifier offenseModifier, ICardLifeModifier lifeModifier, CallParameter parameter)
|
|
{
|
|
bool flag = !GameMgr.GetIns().IsReplayBattle && (!base.SkillPrm.ownerCard.IsPlayer || GameMgr.GetIns().IsWatchBattle);
|
|
if (card.IsInDeck && flag && (BattleManagerBase.GetIns() as NetworkBattleManagerBase).networkBattleData.GetReceiveData().GetReceiveCardList().Any(delegate(CardDataModel c)
|
|
{
|
|
bool flag2 = c.ToStateList.Contains(NetworkBattleDefine.NetworkCardPlaceState.Deck);
|
|
return c.Index == card.Index && !flag2;
|
|
}))
|
|
{
|
|
AddBuffInfoIfNeeded(card);
|
|
card.SkillApplyInformation.GiveBuff();
|
|
if (GetAddLife() > 0)
|
|
{
|
|
card.SkillApplyInformation.GiveBuffLife();
|
|
}
|
|
card.OnRemoveFromInPlayAfterOneTime += delegate
|
|
{
|
|
card.SkillApplyInformation.DepriveBuff();
|
|
return NullVfx.GetInstance();
|
|
};
|
|
return NullVfx.GetInstance();
|
|
}
|
|
return base.GiveCombatModifier(card, offenseModifier, lifeModifier, parameter);
|
|
}
|
|
|
|
protected override void CallPowerUpEvent(List<BattleCardBase> targetCards)
|
|
{
|
|
List<BattleCardBase> cards = targetCards.Where((BattleCardBase c) => c.MetamorphoseCard == null).ToList();
|
|
base.SkillPrm.ownerCard.SelfBattlePlayer.CallOnPowerUp(base.SkillPrm.ownerCard, cards, _addOffense, _addLife, _multiplyOffense, _multiplyLife, _addMaxLife);
|
|
}
|
|
}
|