public void ScalePower(CardData data) { Weapon weapon = data as Weapon; int multiplier = Mathf.FloorToInt(weapon.level/weapon.perLevel); var power = weapon.power; weapon.power = power + weapon.powerScale*multiplier; }
internal Card(IDataRecord reader) { Id = reader.GetInt32(0); Ot = reader.GetInt32(1); Alias = reader.GetInt32(2); Setcode = reader.GetInt64(3); Type = reader.GetInt32(4); int levelInfo = reader.GetInt32(5); Level = levelInfo & 0xff; LScale = (levelInfo >> 24) & 0xff; RScale = (levelInfo >> 16) & 0xff; Race = reader.GetInt32(6); Attribute = reader.GetInt32(7); Attack = reader.GetInt32(8); Defense = reader.GetInt32(9); Data = new CardData() { Code = Id, Alias = Alias, Setcode = Setcode, Type = Type, Level = Level, Attribute = Attribute, Race = Race, Attack = Attack, Defense = Defense, LScale = LScale, RScale = RScale }; }
public App () { var cards = new CardData (); var cardstack = new StackLayout { Spacing = 15, Padding = new Thickness (10), VerticalOptions = LayoutOptions.StartAndExpand, }; foreach (var card in cards) { cardstack.Children.Add (new CardView (card)); } var page = new ContentPage { Title = "Activity", BackgroundColor = Color.White, Content = new ScrollView () { Content = cardstack } }; MainPage = new NavigationPage (page) { BarBackgroundColor = StyleKit.BarBackgroundColor, BarTextColor = Color.White }; }
//生产一副牌 数量52张 public void createCards() { cardsDic.Clear(); mineTakeCardsDic.Clear(); FightingCardsDic.Clear(); indexList.Clear(); //花色 for (int type = 1; type < (int)CardType.xiao; ++type) { for (int number = 1; number <= 13; ++number) { CardData cards = new CardData(CardCosplay.Enemy, (CardType)type, number); int id = cards.getId(); indexList.Add(id); cardsDic.Add(id, cards); hp = hp + number; } } //小王大王数据 for (int type = (int)CardType.xiao; type <= (int)CardType.da; ++type) { int number = type + 9; CardData cards = new CardData(CardCosplay.Enemy, (CardType)type, number); int id = cards.getId(); indexList.Add(id); cardsDic.Add(id, cards); hp = hp + number; } }
public override void init(CardData card) { base.init(card); this.type = card.type; this.eType = card.eType; this.durability = card.durability; }
public CardData getCardData() { CardData result = null; try { Pteid.Init(null); Pteid.SetSODChecking(0); PteidId id = Pteid.GetID(); if (id == null){ return null; } //File.WriteAllBytes("C:\\Users\\Teste\\Fotos1.JP2", Pteid.GetPic().picture); //FIBITMAP bit = FreeImage.LoadEx ("C:\\Users\\Teste\\Fotos1.JP2"); // Bitmap bmp = FreeImage.GetBitmap(bit); // FreeImage.UnloadEx(ref bit); result = new CardData {IdInformation = id}; Pteid.Exit(2); } catch(Exception e) { } return result; }
private IEnumerator ImageViewWithFrame( CardData card, ImageViewWithFrame frame, int imageSize, string resourcePath, float leftMargin = 0, float topMargin = 0, float rightMargin = 0, float bottomMargin = 0) { Texture texture; if (!string.IsNullOrEmpty(resourcePath)) { texture = Resources.Load<Texture>(resourcePath); } else { string path = WebCache.GetCachedPath(card); WWW www = new WWW(path); yield return www; texture = www.texture; } frame.BigSize = imageSize; frame.FrameTexture = FrameObject; frame.ImageTexture = texture; frame.LeftMargin = leftMargin; frame.TopMargin = topMargin; frame.RightMargin = rightMargin; frame.BottomMargin = bottomMargin; frame.MeasureSize(); }
public Material AbilityBake(CardData data, Texture2D picture) { if (test_bake == null) test_bake = (GameObject)Instantiate(test_prefab, transform.position, transform.rotation); test_bake.GetComponent<BakeScript>().SetCardData(data); Material mat = test_bake.GetComponent<BakeScript>().AbilityBake(picture); return mat; }
public Material Bake(CardData data) { if (baked_card == null) baked_card = (GameObject)Instantiate(bake_prefab, transform.position, transform.rotation); baked_card.GetComponent<BakeScript>().SetCardData(data); Material mat = baked_card.GetComponent<BakeScript>().SelectiveBake(); return mat; }
internal Card(CardData data, int ot, string name,string desc) { this.Id = data.Code; this.Ot = ot; this.Data = data; this.Name=name; this.Description=desc; }
public CardData(CardData data) { // should only be using this for reload // title = data.title; cardpower = data.cardpower; bannerframe = data.bannerframe; front = data.front; back = data.back; }
public Material TestBake(CardData data) { if (test_bake == null) test_bake = (GameObject)Instantiate(test_prefab, transform.position, transform.rotation); test_bake.GetComponent<BakeScript>().SetCardData(data); Material mat = test_bake.GetComponent<BakeScript>().SelectiveBake(); GameObject.Destroy(test_bake); return mat; }
public override void init(CardData card) { base.init(card); this.durability = card.durability; manaYield = new int[5]; for (int i = 0; i < manaYield.Length; i++) manaYield[i] = card.manaYield[i]; }
void Awake() { // Put some random numbers to represent cards for now for( int i = 0; i < 10000; ++i ) { var card = new CardData(); card.Id = i; cardsAll.Add( card ); } }
private void init(CardData cardData) { this.init(); this.cardData = cardData; this.setCardImag(); this.setCardTypeView(); this.setCardNumberView(); this.setObjName(); this.addScript(); }
public void CardShouldNotifyObserversWhenNameIsChanged() { var testSubject = new CardData { Name = "initial name" }; testSubject.MonitorEvents(); testSubject.Name = "new value"; testSubject.ShouldRaisePropertyChangeFor(s => s.Name); }
/* public WeaponController () { power = 0; cooldown = 0; speed = 0; level = 0; caster_str = 0; target_def = 0; }*/ public void EnemyClone(CardData data) { MonsterAbility ability = data as MonsterAbility; power = ability.power; cooldown = ability.cooldown; speed = ability.speed; level = ability.level; perLevel = ability.perLevel; powerScale = ability.powerScale; cardpower = ability.cardpower; }
void Awake() { if (instance!=null) { Destroy(gameObject); } else { instance = this; DontDestroyOnLoad(gameObject); } }
public Monster(CardData data) { title = data.title; type = data.type; stats = data.stats; desc = data.desc; flavour = data.flavour; flines = data.flines; level = data.level; image = data.image; back = data.back; front = data.front; }
public string ToolTip(CardData selected_card) { var type = selected_card.GetType(); if(type == typeof(Item)){ Item item = (Item)selected_card; return "Title :\n"+ title +"\n\nType :\n"+ type +"\n\nValue :\n"+ item.value +"\n\nFlavour :\n"+ flavour; } if(type == typeof(Monster)){ Monster monster = (Monster)selected_card; return "Title :\n"+ title +"\n\nHealth :\n"+ monster.max_health +"\n\nFlavour :\n"+ flavour; } else { return "Title :\n"+ title +"\n\nType :\n"+ type +"\n\nDesc :\n"+ desc +"\n\nFlavour :\n"+ flavour; } }
void Start() { int position = 1; foreach (Sprite sprite in CardSprites.OrderByDescending(s => int.Parse(s.name.Split('_')[0]))) { Data = new CardData(); string[] name = sprite.name.Split('_'); CardRenderer.sprite = sprite; Data.Number = int.Parse(name[0]); Data.Type = name[2]; Data.Collumn = 0; Data.Flipped = true; Data.PositionOnStart = position; Data.MoveLocation = StartPosition.transform.position; Data.Black = name[2] == "spades" || name[2] == "clubs"; Cards.Add((GameObject)Instantiate(Card, StartPosition.transform.position, Quaternion.identity), Data); position++; } float freeStace = (renderer.bounds.size.x - (Collumns[0].renderer.bounds.size.x * Collumns.Length)) / (Collumns.Length * 2); float leftBound = (transform.position.x - renderer.bounds.size.x / 2); float collumnSize = Collumns[0].renderer.bounds.size.x; float[] xPositions = new float[7]; for (int i = 0; i < 7; i++) { xPositions[i] = (leftBound + ((collumnSize + (freeStace * 2)) * i) + freeStace + (Collumns[0].renderer.bounds.size.x / 2)); } for (int i = 0; i < Collumns.Length; i++) { float a = (leftBound + ((collumnSize + (freeStace * 2)) * i) + freeStace + (Collumns[0].renderer.bounds.size.x / 2)); Collumns[i].transform.position = new Vector3(a, Collumns[i].transform.position.y, Collumns[i].transform.position.z); Instantiate(Collumns[i], new Vector3(a, Collumns[i].transform.position.y, Collumns[i].transform.position.z), Quaternion.identity); } for (int i = 0; i < StackCollumns.Length; i++) { float a = (leftBound + ((collumnSize + (freeStace * 2)) * (i + 3)) + freeStace + (Collumns[0].renderer.bounds.size.x / 2)); StackCollumns[i].transform.position = new Vector3(a, StartPosition.transform.position.y, StartPosition.transform.position.z); Instantiate(StackCollumns[i], new Vector3(a, StartPosition.transform.position.y, StartPosition.transform.position.z), Quaternion.identity); } float b = (leftBound + freeStace + (Collumns[0].renderer.bounds.size.x / 2)); StartPosition.transform.position = new Vector3(b, StartPosition.transform.position.y, StartPosition.transform.position.z); Instantiate(StartPosition, new Vector3(b, StartPosition.transform.position.y, StartPosition.transform.position.z), Quaternion.identity); Deal(); }
public void Add(Cards card, int NumofCards) { try { CardData cd = new CardData(); cd.Amount = card.Amount; cd.Expiry = card.Expiry; for (int i = 0; i < NumofCards; i++) { client.AddCards(cd); } } catch (Exception ex) { throw ex; } }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.ViewCard); var cardName = this.Intent.GetStringExtra(Constants.EXTRA_CARD_NAME); _imageNum = this.Intent.GetIntExtra(Constants.EXTRA_IMAGE_NUMBER, 0); _data = CardManager.Instance.GetCard(cardName); if (_data == null) { Finish(); return; } _image = FindViewById<ImageView>(Resource.Id.cardImageView); ShowImage(); }
override public void Redraw() { if (actionCard == null) { actionCard = GetComponent <ActionCard>(); } front.SetActive(actionCard.Visible); back.SetActive(!actionCard.Visible); if (actionCard.Visible) { data = actionCard.data; if (!data) { return; } nameRenderer.text = data.name; ageRenderer.text = data.age.ToString(); background.color = CardData.CardColor[(int)data.type]; if (data.chainRequirement != null) { chainRequirementRenderer.gameObject.SetActive(true); chainRequirementRenderer.text = data.chainRequirement.name; } else { chainRequirementRenderer.gameObject.SetActive(false); } if (data.chainProvides != null) { if (data.chainProvides.Length == 2) { chainProvides1Renderer.gameObject.SetActive(true); chainProvides2Renderer.gameObject.SetActive(true); chainProvides1Renderer.text = data.chainProvides[0].name; chainProvides2Renderer.text = data.chainProvides[1].name; } else if (data.chainProvides.Length == 1) { chainProvides1Renderer.text = data.chainProvides[0].name; chainProvides2Renderer.gameObject.SetActive(true); chainProvides2Renderer.gameObject.SetActive(false); } else { chainProvides1Renderer.gameObject.SetActive(false); chainProvides2Renderer.gameObject.SetActive(false); } } else { chainRequirementRenderer.gameObject.SetActive(false); } for (int c = 0; c < data.cost.Length; ++c) { costRenderer[c].gameObject.SetActive(true); costRenderer[c].Set(data.cost[c]); } for (int c = data.cost.Length; c < costRenderer.Length; ++c) { costRenderer[c].gameObject.SetActive(false); } int p = 0; foreach (var option in data.production) { if (p >= productionRenderer.Length) { break; } foreach (ResourceType production in option.content) { productionRenderer[p].gameObject.SetActive(true); productionRenderer[p].Set(production); ++p; if (p >= productionRenderer.Length) { break; } } } for (; p < productionRenderer.Length; ++p) { productionRenderer[p].gameObject.SetActive(false); } } }
public override void SetCardData(CardData data) { _CardData = data; }
public K_ThanCounselorShipCard(Player player, CardData shipCardData) : base(player, shipCardData) { }
public void ResolveFormulasToValues(CardData card, ConfigFile configFile) { throw new NotImplementedException(); }
public void SetInfo(CardData _card) { card = _card; }
public KaikenSupportShipCard(Player player, CardData shipCardData) : base(player, shipCardData) { }
public void Initialize(CardData cardData) { data = cardData; suitText.text = CardData.SUIT_TEXT_TABLE[data.suit]; numberText.text = data.number.ToString(); }
public SmallCardController(CardData card) : base(card) { }
public void EnemyAttack(CardData cardData) { int row = -1; int col = -1; if (AI_Difficulty == 0) { for (int i = 0; i < AI_Difficulty; i++) { row = Random.Range(0, 2); col = Random.Range(0, 2); if (CardManager.Instance.elementToTerrainType[cardData.eType] != CanvasUI.battleBoxes[row, col].GetTerrainType) { break; } } } else { int bestRow = -1; int bestCol = -1; //查找克制最优解 for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { if (CardManager.Instance.restraintTable[cardData.eType] == CanvasUI.battleBoxes[i, j].GetTerrainType) { if (CanvasUI.battleBoxes[i, j]._Camp == BattleBox.Camp.my) { bestRow = i; bestCol = j; } else { row = i; col = j; } break; } } } //若无最优解,则找次优解 if (row == -1) { for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { if (CardManager.Instance.elementToTerrainType[cardData.eType] != CanvasUI.battleBoxes[i, j].GetTerrainType) { if (CanvasUI.battleBoxes[i, j]._Camp == BattleBox.Camp.my) { bestRow = i; bestCol = j; } else { row = i; col = j; } break; } } } } if (bestRow != -1) { row = bestRow; col = bestCol; } } //若无解则随机选定 if (row == -1) { row = Random.Range(0, 2); col = Random.Range(0, 2); } string str; CardType type; CheckAttackType(cardData, row, col, out str, out type); if (type == CardType.AttackCard) { EventManager.Instance.UpdateBattleInfo("敌方使用了" + str + "攻击卡"); } else if (type == CardType.TerrainCard) { EventManager.Instance.UpdateBattleInfo("敌方使用了地形卡:" + str); } }
public CardsOwned(CardData newCard, int initalCount) { card = newCard; cardCount = initalCount; }
public Card(CardData data) { Data = data; }
void AddCard() { CardData newItem = new CardData(); cardDataList.cardList.Add(newItem); buttonToggled.Add(false); toggledIndex = cardDataList.cardList.Count - 1; }
public CardsOwned(CardData newCard) { card = newCard; cardCount = 0; }
public BlazeInterceptorShipCard(Player player, CardData shipCardData) : base(player, shipCardData) { }
void Test() { foreach(var card in spawned_cards){ GameObject.Destroy (card); } spawned_cards.Clear(); if (thisClass == "M"){ card_data = new Monster(card_data); } CreateCard (GameObject.Find("spawn_card_front").transform); CreateCard (GameObject.Find ("spawn_card_back").transform); }
/// <summary> /// Sets cards data and graphics /// </summary> /// <param name="type"></param> /// <param name="suit"></param> public void Set(CardData data) { Data = data; Refresh(); }
public virtual void UpdateGraphics(CardData data) { _faceRender.sprite = data.runtimeFace; _backRender.sprite = data.runtimeBack; }
public void AddCard(CardData card) => cards.Add(card);
public void findcard(CardData Card) { }
/// <summary> /// Обработчик специального события, инициируемого после активации пользоваетелем одного из методов карточки. /// </summary> /// <param name="e">Параметры метода карточки.</param> protected override void OnCardAction(CardActionEventArgs e) { System.Windows.Forms.MessageBox.Show("Действие"); base.OnCardAction(e); try { System.Windows.Forms.MessageBox.Show("Режимы"); if (e.ActionId == RefEquipmentCard.Actions.OpenFiles) { if (!CardData.IsNull()) { String FolderPath = CardData.Sections[RefEquipmentCard.MainInfo.ID].FirstRow.GetString(RefEquipmentCard.MainInfo.Folder); if (!String.IsNullOrWhiteSpace(FolderPath) && Directory.Exists(FolderPath)) { Process.Start("explorer", "\"" + FolderPath + "\""); } else { CardHost.ShowCard(CardData.Id, RefEquipmentCard.Modes.OpenFiles, this.CardData.ArchiveState == ArchiveState.NotArchived ? ActivateMode.Edit : ActivateMode.ReadOnly); } } } else if (e.ActionId == RefEquipmentCard.Actions.OpenCardAndFiles) { CardHost.ShowCard(CardData.Id, RefEquipmentCard.Modes.OpenCardAndFiles, this.CardData.ArchiveState == ArchiveState.NotArchived ? ActivateMode.Edit : ActivateMode.ReadOnly); } else if (e.ActionId == RefEquipmentCard.Actions.OpenCard) { CardHost.ShowCard(CardData.Id, RefEquipmentCard.Modes.OpenCard, this.CardData.ArchiveState == ArchiveState.NotArchived ? ActivateMode.Edit : ActivateMode.ReadOnly); } else if (e.ActionId == RefEquipmentCard.Actions.Delete) { IList <StatesOperation> Operations = StateService.GetOperations(BaseObject.SystemInfo.CardKind) ?? new List <StatesOperation>(); StatesOperation Operation = Operations.FirstOrDefault(item => item.DefaultName == "Modify"); if (!Operation.IsNull()) { if (AccessCheckingService.IsOperationAllowed(BaseObject, Operation)) { switch (ShowMessage("Вы уверены, что хотите удалить выбранную карточку и связанные файлы?", "Docsvision Navigator", MessageType.Question, MessageButtons.YesNo)) { case MessageResult.Yes: Boolean ByMe; String OwnerName; if (!LockService.IsObjectLocked <BaseCard>(BaseObject, out ByMe, out OwnerName)) { if (Session.DeleteCard(CardData.Id)) { ShowMessage("Карточка и файлы удалены!", "Docsvision Navigator", MessageType.Information, MessageButtons.Ok); } else { ShowMessage("Не удалось удалить карточку!" + Environment.NewLine + "Обратитесь к системному администратору!", "Docsvision Navigator", MessageType.Error, MessageButtons.Ok); } } else { ShowMessage("Невозможно удалить карточку " + BaseObject.Description + "." + Environment.NewLine + "Карточка заблокирована " + (ByMe ? "вами" : "пользователем " + OwnerName) + "!", "Docsvision Navigator", MessageType.Warning, MessageButtons.Ok); } break; } } } } } catch (Exception ex) { this.ProcessException(ex); } }
public TestCard() { Info = new CardData(); }
public static Card create( CardData cardData ) { Card card = new Card(); card.init(cardData); return card; }
public void SetData(CardData data) { this.data = data; illustration.sprite = data.illustration; }
public void AddNewCard(CardData data) { //create the prefab GameObject newCard = m_CardPrefabPool.GetPooledObject (); CardUI cardUI = newCard.GetComponent<CardUI>(); if (cardUI != null) { //init newCard.SetActive(true); cardUI.Init(); cardUI._Image.sprite = GetSpriteOfCard(data.Type); cardUI._Value = data.Value; cardUI._Index = m_Cards.Count; cardUI._Card = data; //events cardUI.OnPointerEnter += cardUI_OnPointerEnter; cardUI.OnPointerExit += cardUI_OnPointerExit; cardUI.OnPointerUp += cardUI_OnPointerUP; //add as perent newCard.transform.SetParent(this.transform); newCard.transform.localPosition = Vector3.zero; newCard.transform.localScale = new Vector3(1, 1, 1); //add to the list m_Cards.Add(cardUI); } else { Debug.LogError("No CarUI script on card ui pooled object prefab :O"); } }
static void Create(CardData card, int cardNo) { switch (cardNo) { case 0: card.cardShowName = "Bug"; card.cardDescription = "看到這張卡代表BUG,請回報!!!"; break; case 1: card.cardShowName = "TEST1"; card.cardDescription = "無目標"; card.oriCost = 0; card.cardEffects.Add(new nCardEffect.GainEnergy(1)); break; case 2: card.cardShowName = "TEST2"; card.cardDescription = "敵方"; card.oriCost = 2; card.oriExhasut = true; card.oriOverLoad = 2; card.charFilters.Add(new CharFilter("Camps", 2)); card.isSelectTarget = true; card.cardEffects.Add(new nCardEffect.DamageEffectSelect(20)); break; case 3: card.cardShowName = "TEST3"; card.cardDescription = "友方"; card.oriCost = 3; card.charFilters.Add(new CharFilter("Camps", 1)); card.isSelectTarget = true; card.cardEffects.Add(new nCardEffect.DamageEffectSelect(30)); break; case 4: card.cardShowName = "TEST4"; card.cardDescription = "全體角色"; card.oriCost = 3; card.isSelectTarget = true; card.cardEffects.Add(new nCardEffect.DamageEffectSelect(40)); break; case 5: card.cardShowName = "TEST4"; card.cardDescription = "賦予絕對和平狀態3回合"; card.oriCost = 1; card.isSelectTarget = true; card.cardEffects.Add(new nCardEffect.GiveCharStatusSelect("DamageToZero", 3)); break; case 10: card.cardName = "Attack"; card.cardShowName = "打擊"; card.cardDescription = "對一個敵方角色造成@D點傷害"; card.oriCardShowNum = 17; card.oriCost = 1; card.isSelectTarget = true; card.charFilters.Add(new CharFilter("Camps", 2)); card.cardEffects.Add(new nCardEffect.DamageEffectSelect(17)); break; case 11: card.cardName = "HeroicAttack"; card.cardShowName = "英勇突擊"; card.cardDescription = "對最前方角色造成@D點傷害"; card.oriCardShowNum = 23; card.oriCost = 1; card.isSelectTarget = true; card.charFilters.Add(new CharFilter("Front")); card.cardEffects.Add(new nCardEffect.DamageEffectSelect(23)); break; case 12: card.cardName = "Armor"; card.cardShowName = "防禦"; card.cardDescription = "自身獲得@A護盾"; card.oriCardShowNum = 15; card.oriCost = 1; card.cardEffects.Add(new nCardEffect.ArmorSelf(15)); break; case 13: card.cardName = "Bash"; card.cardShowName = "重擊"; card.cardDescription = "對一個敵方角色造成@D點傷害,脆弱一回合"; card.oriCardShowNum = 25; card.oriCost = 2; card.isSelectTarget = true; card.charFilters.Add(new CharFilter("Camps", 2)); card.cardEffects.Add(new nCardEffect.DamageEffectSelect(25)); card.cardEffects.Add(new nCardEffect.GiveCharStatusSelect("Fragile", 1)); break; case 14: card.cardName = "MagicScurrying"; card.cardShowName = "法力亂竄"; card.cardDescription = "對隨機一個敵人造成@D傷害,自身獲得一點魔力"; card.oriCardShowNum = 17; card.oriCost = 1; card.cardEffects.Add(new nCardEffect.DamageRandomEnemy(17)); card.cardEffects.Add(new nCardEffect.MagicSelf(1)); break; case 15: card.cardName = "MagicSiphon"; card.cardShowName = "法力虹吸"; card.cardDescription = "對一個敵方角色造成@D點傷害。若擊殺目標,自身獲得一點魔力"; card.oriCardShowNum = 25; card.oriCost = 2; card.isSelectTarget = true; card.charFilters.Add(new CharFilter("Camps", 2)); card.cardEffects.Add(new nCardEffect.DamageEffectSelect(25)); card.cardEffects.Add(new nCardEffect.GainMagicIfTargetDie(1)); break; case 16: card.cardName = "CurseArmor"; card.cardShowName = "詛咒之盾"; card.cardDescription = "對自身造成@D點傷害,自身獲得30點護盾"; card.oriCardShowNum = 10; card.oriCost = 1; card.cardEffects.Add(new nCardEffect.DamageSelf(10)); card.cardEffects.Add(new nCardEffect.ArmorSelf(30)); break; case 17: card.cardName = "WaveFist"; card.cardShowName = "波動拳"; card.cardDescription = "對一個敵方角色造成@D點傷害。強化:+4點傷害"; card.oriCardShowNum = 16; card.oriCost = 1; card.canBurst = true; card.isSelectTarget = true; card.charFilters.Add(new CharFilter("Camps", 2)); card.cardEffects.Add(new nCardEffect.DamageEffectSelectBurst(16, 4)); break; case 18: card.cardName = "DeterminationArmor"; card.cardShowName = "決心之盾"; card.cardDescription = "自身獲得@A點護盾。超載(1)"; card.oriCardShowNum = 30; card.oriCost = 1; card.oriOverLoad = 1; card.cardEffects.Add(new nCardEffect.ArmorSelf(30)); break; case 19: card.cardName = "Gluttony"; card.cardShowName = "暴食"; card.cardDescription = "獲得2點能量。消耗"; card.oriCost = 0; card.oriExhasut = true; card.cardEffects.Add(new nCardEffect.GainEnergy(2)); break; case 20: card.cardName = "MagicArrow"; card.cardShowName = "魔導箭"; card.cardDescription = "對一個敵方角色造成@D點傷害。魔導(1):再造成一次傷害"; card.oriCardShowNum = 15; card.oriCost = 1; card.oriMagicConsume = 1; card.isSelectTarget = true; card.charFilters.Add(new CharFilter("Camps", 2)); card.cardEffects.Add(new nCardEffect.DamageEffectSelect(15)); card.cardEffects.Add(new nCardEffect.DamageEffectSelectMagic(15)); break; case 21: card.cardName = "Wish"; card.cardShowName = "心願"; card.cardDescription = "對所有敵方角色造成@D點傷害。魔導(2):歸還能量"; card.oriCardShowNum = 10; card.oriCost = 2; card.oriMagicConsume = 2; card.cardEffects.Add(new nCardEffect.DamageAllEnemy(10)); card.cardEffects.Add(new nCardEffect.BackEnergyIfMagic()); break; case 22: card.cardName = "ConcentratedBreathing"; card.cardShowName = "集中呼吸"; card.cardDescription = "自身獲得@A點護盾。連結:歸還能量"; card.oriCardShowNum = 10; card.oriCost = 1; card.oriSoulLink = true; card.cardEffects.Add(new nCardEffect.ArmorSelf(10)); card.cardEffects.Add(new nCardEffect.BackEnergyIfLink()); break; case 23: card.cardName = "Reorganize"; card.cardShowName = "重新整理"; card.cardDescription = "丟棄所有手牌"; card.oriCost = 1; card.cardEffects.Add(new nCardEffect.DiscardAllHand()); break; case 24: card.cardName = "Battery"; card.cardShowName = "電池"; card.cardDescription = "自身獲得@O點能量。強化:再獲得1點能量"; card.oriCardShowNum = 1; card.oriCost = 0; card.canBurst = true; card.cardEffects.Add(new nCardEffect.GainEnergy(1)); card.cardEffects.Add(new nCardEffect.GainEnergyBurst(1)); card.cardShowNumFilter = new nCardShowNumFilter.PerBurst(1); break; case 25: card.cardName = "EnergyPulse"; card.cardShowName = "能量脈衝"; card.cardDescription = "對所有敵方角色造成@D點傷害,脆弱一回合。強化:此卡花費減少(1)"; card.oriCardShowNum = 10; card.oriCost = 3; card.canBurst = true; card.cardEffects.Add(new nCardEffect.DamageAllEnemy(10)); card.cardEffects.Add(new nCardEffect.GiveCharStatusAllEnemy("Fragile", 1)); card.cardStatusControl.EnterStatus(new nCardStatus.CostDownAtBurst(1)); break; case 26: card.cardName = "MagicFlash"; card.cardShowName = "法力閃燃"; card.cardDescription = "對一個隨機敵方角色造成@D點傷害。魔導(1):複製一張此卡放到你牌庫頂"; card.oriCardShowNum = 8; card.oriCost = 0; card.oriMagicConsume = 1; card.cardEffects.Add(new nCardEffect.DamageRandomEnemy(8)); card.cardEffects.Add(new nCardEffect.CopySelfToDeckMagic()); break; case 27: card.cardName = "GreedyArmor"; card.cardShowName = "貪婪之盾"; card.cardDescription = "對一個其他友方角色造成@D點傷害,自身獲得35點護盾"; card.oriCardShowNum = 15; card.oriCost = 1; card.isSelectTarget = true; card.charFilters.Add(new CharFilter("Camps", 1)); card.charFilters.Add(new CharFilter("NotCurrent")); card.cardEffects.Add(new nCardEffect.DamageEffectSelect(15)); card.cardEffects.Add(new nCardEffect.ArmorSelf(35)); break; case 28: card.cardName = "LimitedWill"; card.cardShowName = "極限意志"; card.cardDescription = "所有友方角色獲得@A點護盾。超載(2)"; card.oriCardShowNum = 20; card.oriCost = 1; card.oriOverLoad = 2; card.cardEffects.Add(new nCardEffect.ArmorAllAlly(20)); break; case 29: card.cardName = "RotationDistance"; card.cardShowName = "迴轉距離"; card.cardDescription = "對所有敵人造成@D點傷害,放一張「記憶斷片」到你手中"; card.oriCardShowNum = 17; card.oriCost = 1; card.cardEffects.Add(new nCardEffect.DamageAllEnemy(17)); card.cardEffects.Add(new nCardEffect.NewCardToHand(700)); break; case 30: card.cardName = "BeastDance"; card.cardShowName = "野獸之舞"; card.cardDescription = "此卡在你手上時,自身力量+5"; card.oriCost = 0; card.cardStatusControl.EnterStatus(new nCardStatus.BeastDance(5)); break; case 31: card.cardName = "GhostRule"; card.cardShowName = "幽靈法則"; card.cardDescription = "你的手牌消耗降低(1),放2張記憶斷片到你的牌庫中"; card.oriCost = 0; card.cardEffects.Add(new nCardEffect.HandCardCostAdjust(-1)); card.cardEffects.Add(new nCardEffect.NewCardToHand(700)); card.cardEffects.Add(new nCardEffect.NewCardToHand(700)); break; case 32: card.cardName = "ThunderTouch"; card.cardShowName = "雷神"; card.cardDescription = "對最前方角色造成@D點傷害,自身移動到最前方"; card.oriCardShowNum = 15; card.oriCost = 1; card.cardEffects.Add(new nCardEffect.DamageFront(15)); card.cardEffects.Add(new nCardEffect.ChangeToFront()); break; case 33: card.cardName = "JuniorMagicStone"; card.cardShowName = "初級魔法石"; card.cardDescription = "獲得1點魔力"; card.oriCost = 0; card.cardEffects.Add(new nCardEffect.MagicSelf(1)); break; case 501: card.cardName = "RedLightLight"; card.cardShowName = ""; card.cardDescription = "獲得一點能量。消耗"; card.oriCost = 0; card.oriExhasut = true; card.cardEffects.Add(new nCardEffect.GainEnergy(1)); break; case 700: card.cardName = "MemoryFragment"; card.cardShowName = "記憶斷片"; card.cardDescription = "無效果。消耗"; card.oriCost = 1; card.oriExhasut = true; card.negativeCard = true; break; } }
public void SetCardData(CardData card_data) { card_data_ = card_data; }
public virtual void Initialize(CardData data) { UpdateGraphics(data); }
public void AddCard(CardData card) { _cards.Add(card); }
//由Controller调用, 人物将新卡加入List public void AddCard(CardData card) { myCardList.Add(card); }
public static CardData gather(int multiverseId) { string url = string.Format("http://gatherer.wizards.com/Pages/Card/Details.aspx?printed=true&multiverseid={0}", multiverseId); System.Net.WebClient wc = new System.Net.WebClient(); wc.Encoding = System.Text.Encoding.UTF8; HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument(); doc.LoadHtml(wc.DownloadString(url)); CardData result = new CardData(multiverseId.ToString()); try { result.cardTitle = doc.DocumentNode.SelectSingleNode("//div[@id='ctl00_ctl00_ctl00_MainContent_SubContent_SubContent_nameRow']/div[@class='value']").InnerText.Trim(); } catch{} try { result.cardExpansion = doc.DocumentNode.SelectSingleNode("//div[@id='ctl00_ctl00_ctl00_MainContent_SubContent_SubContent_setRow']/div[@class='value']").InnerText.Trim(); } catch { } try { result.cardManaCost = doc.DocumentNode.SelectSingleNode("//div[@id='ctl00_ctl00_ctl00_MainContent_SubContent_SubContent_cmcRow']/div[@class='value']").InnerText.Trim(); } catch { } try{ result.cardText = doc.DocumentNode.SelectSingleNode("//div[@id='ctl00_ctl00_ctl00_MainContent_SubContent_SubContent_textRow']/div[@class='value']/div").InnerText.Trim(); } catch{} try { result.cardFlavorText = doc.DocumentNode.SelectSingleNode("//div[@id='ctl00_ctl00_ctl00_MainContent_SubContent_SubContent_flavorRow']/div[@class='value']").InnerText.Trim(); } catch { } try { result.cardPT = doc.DocumentNode.SelectSingleNode("//div[@id='ctl00_ctl00_ctl00_MainContent_SubContent_SubContent_ptRow']/div[@class='value']").InnerText.Trim(); } catch { } try { result.cardRarity = doc.DocumentNode.SelectSingleNode("//div[@id='ctl00_ctl00_ctl00_MainContent_SubContent_SubContent_rarityRow']/div[@class='value']").InnerText.Trim(); } catch { } try { result.cardNumber = doc.DocumentNode.SelectSingleNode("//div[@id='ctl00_ctl00_ctl00_MainContent_SubContent_SubContent_numberRow']/div[@class='value']").InnerText.Trim(); } catch { } try { result.cardArtist = doc.DocumentNode.SelectSingleNode("//div[@id='ctl00_ctl00_ctl00_MainContent_SubContent_SubContent_artistRow']/div[@class='value']").InnerText.Trim(); } catch { } try { result.cardFoil = doc.DocumentNode.SelectSingleNode("//div[@id='ctl00_ctl00_ctl00_MainContent_SubContent_SubContent_ArtistCredit']/div[@class='value']").InnerText.Trim(); } catch { } try { result.cardTypes.AddRange(doc.DocumentNode.SelectSingleNode("//div[@id='ctl00_ctl00_ctl00_MainContent_SubContent_SubContent_typeRow']/div[@class='value']").InnerText.Trim().Split('—')); for (int i = 0; i < result.cardTypes.Count; i++) { result.cardTypes[i] = result.cardTypes[i].Trim(); } } catch { } return result; }
public TetDroneShipCard(Player player, CardData shipCardData) : base(player, shipCardData) { }