feat(battle-engine): M1 auto-copy closure (782 battle-logic files)
Compile-driven bulk-copy loop (tools/engine-port/m1_copy_loop.py) pulled the precise reference closure of the battle-core roots, stopping at the classify god-object/View-VFX-UI boundary. 782 files; no re-explosion (M0 had estimated ~order 1000). Residual frontier = 52 shim-classified + 80 external (Unity/BCL) types to author next.
This commit is contained in:
101
SVSim.BattleEngine/Engine/Wizard/GenerateDeckCodeTask.cs
Normal file
101
SVSim.BattleEngine/Engine/Wizard/GenerateDeckCodeTask.cs
Normal file
@@ -0,0 +1,101 @@
|
||||
using Cute;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class GenerateDeckCodeTask : BaseTask
|
||||
{
|
||||
public enum SubmitDeckType
|
||||
{
|
||||
NORMAL = 1,
|
||||
TWO_PICK = 2,
|
||||
SEALED = 4,
|
||||
Chaos = 5,
|
||||
Crossover = 6,
|
||||
MY_ROTATION = 7
|
||||
}
|
||||
|
||||
public class GenerateDeckCodeTaskParam : BaseParam
|
||||
{
|
||||
public int clan;
|
||||
|
||||
public int deck_format;
|
||||
|
||||
public int[] cardID;
|
||||
|
||||
public int[] phantomCardID;
|
||||
}
|
||||
|
||||
public class GenerateDeckCodeTaskUseSubClassParam : BaseParam
|
||||
{
|
||||
public int clan;
|
||||
|
||||
public int sub_clan;
|
||||
|
||||
public int deck_format;
|
||||
|
||||
public int[] cardID;
|
||||
|
||||
public int[] phantomCardID;
|
||||
}
|
||||
|
||||
public class GenerateDeckCodeTaskMyRotation : BaseParam
|
||||
{
|
||||
public int clan;
|
||||
|
||||
public int deck_format;
|
||||
|
||||
public int[] cardID;
|
||||
|
||||
public string rotation_id;
|
||||
}
|
||||
|
||||
public override string Url => $"{CustomPreference.GetDeckBuilderServerURL()}{ApiType.ApiList[base.type]}";
|
||||
|
||||
public GenerateDeckCodeTask()
|
||||
{
|
||||
base.type = ApiType.Type.GenerateDeckCode;
|
||||
}
|
||||
|
||||
public void SetParameter(int clan_id, SubmitDeckType type, int[] card_id_array, int[] phantomCardIdList = null)
|
||||
{
|
||||
GenerateDeckCodeTaskParam generateDeckCodeTaskParam = new GenerateDeckCodeTaskParam();
|
||||
generateDeckCodeTaskParam.clan = clan_id;
|
||||
generateDeckCodeTaskParam.deck_format = (int)type;
|
||||
generateDeckCodeTaskParam.cardID = card_id_array;
|
||||
generateDeckCodeTaskParam.phantomCardID = phantomCardIdList;
|
||||
base.Params = generateDeckCodeTaskParam;
|
||||
}
|
||||
|
||||
public void SetParameterMyRotation(DeckData deck, SubmitDeckType type)
|
||||
{
|
||||
GenerateDeckCodeTaskMyRotation generateDeckCodeTaskMyRotation = new GenerateDeckCodeTaskMyRotation();
|
||||
generateDeckCodeTaskMyRotation.clan = deck.GetDeckClassID();
|
||||
generateDeckCodeTaskMyRotation.deck_format = (int)type;
|
||||
generateDeckCodeTaskMyRotation.cardID = deck.GetCardIdList().ToArray();
|
||||
generateDeckCodeTaskMyRotation.rotation_id = deck.MyRotationId;
|
||||
base.Params = generateDeckCodeTaskMyRotation;
|
||||
}
|
||||
|
||||
public void SetParameter(int clan_id, int sub_clan, SubmitDeckType type, int[] card_id_array, int[] phantomCardIdList = null)
|
||||
{
|
||||
GenerateDeckCodeTaskUseSubClassParam generateDeckCodeTaskUseSubClassParam = new GenerateDeckCodeTaskUseSubClassParam();
|
||||
generateDeckCodeTaskUseSubClassParam.clan = clan_id;
|
||||
generateDeckCodeTaskUseSubClassParam.sub_clan = sub_clan;
|
||||
generateDeckCodeTaskUseSubClassParam.deck_format = (int)type;
|
||||
generateDeckCodeTaskUseSubClassParam.cardID = card_id_array;
|
||||
generateDeckCodeTaskUseSubClassParam.phantomCardID = phantomCardIdList;
|
||||
base.Params = generateDeckCodeTaskUseSubClassParam;
|
||||
}
|
||||
|
||||
protected override int Parse()
|
||||
{
|
||||
int num = base.Parse();
|
||||
if (num != 1)
|
||||
{
|
||||
return num;
|
||||
}
|
||||
string deck_code = (string)base.ResponseData["data"]["deck_code"];
|
||||
Data.GenerateDeckCode.deck_code = deck_code;
|
||||
return num;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user