public BattleResult GetBattleResult(Summon redSummon, Summon blueSummon)
    {
        if (redSummon == blueSummon)
        {
            return BattleResult.Draw;
        }
        else if (redSummon == Summon.NONE)
        {
            return BattleResult.BlueVictory;
        }
        else if (blueSummon == Summon.NONE)
        {
            return BattleResult.RedVictory;
        }

        string redDefeats;
        if(battleResults.TryGetValue(redSummon.ToString(), out redDefeats))
        {
            if (redDefeats.Contains(blueSummon.ToString()))
            {
                ++SFPandasScore;
                return BattleResult.RedVictory;
            }
            else
            {
                ++STLLambsScore;
                return BattleResult.BlueVictory;
            }
        }
        else
        {
            Debug.LogError("Bad Dictionary battleResults Get call");
            return BattleResult.Draw;
        }
    }
Beispiel #2
0
 private void Summon_AfterDeadEvt(Fighter summon, bool recursiveCall)
 {
     if (!summon.Fight.CheckFightEnd() && !recursiveCall)
     {
         Summon.SummonFighter(MonsterRecord.GetMonster(TREE_SPELLID), (summon as SummonedFighter).GradeId, Source, summon.Point);
     }
 }
Beispiel #3
0
 public override void Cast_Spell(Summon s)
 {
     base.Cast_Spell(s);
     if (Random.Range(0, 101) > 90)
     {
         results += new Poison().Do_Ability(s);
     }
 }
 protected virtual void Awake()
 {
     animator       = GetComponent <Animator>();
     spriteRenderer = GetComponent <SpriteRenderer>();
     summon         = GetComponent <Summon>();
     boardManager   = FindObjectOfType <BoardManager>();
     gameManager    = FindObjectOfType <GameManager>();
     boss           = FindObjectOfType <Boss>();
 }
Beispiel #5
0
 public override void Cast_Spell(Summon s)
 {
     base.Cast_Spell(s);
     // 10% chance to Heal
     if (Random.Range(0, 101) > 90)
     {
         results += new Heal().Do_Ability(s);
     }
 }
Beispiel #6
0
 // Use this for initialization
 void Start()
 {
     thisTurnPlayer     = WhosTurn.Player1;
     spriteChangeCaller = GameObject.Find("SummonButton").GetComponent <Summon>();
     diceControl        = GameObject.Find("RollDiceButton").GetComponent <DiceRoll>();
     manaup             = GameObject.Find("GameManager").GetComponent <GameManage>();
     ResourceStat();
     TurnCounterOn();
 }
Beispiel #7
0
        public override void EndTurn()
        {
            Summon controller = Controller;

            if (controller.LifeTime == 0)
            {
                controller.Destroy();
            }
        }
Beispiel #8
0
        public static Packet RemoveSummon(Summon summon, byte leaveType)
        {
            Packet pw = new Packet(ServerMessages.SPAWN_LEAVE_FIELD);

            pw.WriteInt(summon.OwnerId);
            pw.WriteInt(summon.SkillId);
            pw.WriteByte(leaveType);
            return(pw);
        }
    // Use this for initialization
    void Start()
    {
        checker = GameObject.Find("SummonButton").GetComponent <Summon>();
        transform.SetParent(checker.PlayerUnits[(int)FinishButtonClick.thisTurnPlayer].Units[NextButtonClick.unitMoveIndex].GetComponent <UnitStatus>().attackFxPos);

        Vector3 target = GameManage.targetTr.position + new Vector3(0.0f, 4.0f, 0.0f);

        gameObject.transform.LookAt(target);
    }
    private void SummonUnit(Summon summon)
    {
        int response = bm.SummonUnitOpp(summon);

        Debug.Log("Summon: " + summon);
        if (response == 0)
        {
            SetReward(summon.cost / 1000f);
        }
    }
Beispiel #11
0
            /// <summary>
            /// 依据种类锁定定价规则
            /// </summary>
            /// <param name="summon"></param>
            /// <returns></returns>
            public static SummomPriceRule GetSummonKindId(Summon summon)
            {
                var priceRule = GetSummonKindPriceList(summon);

                if (priceRule == null)
                {
                    Program.setting.LogInfo("类型库中不存在" + summon.ID + "当前库共有" + SummomPriceRuleList.Count + "种", summon.server.ServerName);
                }
                return(priceRule);
            }
Beispiel #12
0
 public SpellResults Do_Ability(Summon s)
 {
     int heal = s.Base_Health / 10 + s.Curse * 5;
     SpellResults r = new SpellResults(0, 0, heal, 0, 0, 0);
     //if (Random.Range(0, 101) > 80)
         r += new Burn().Do_Ability(s);
     //if (Random.Range(0, 101) > 80)
         r += new Poison().Do_Ability(s);
     return r;
 }
Beispiel #13
0
        private static void SendMoveSummon(Character chr, Summon summon, MovePath movePath)
        {
            Packet pw = new Packet(ServerMessages.SPAWN_MOVE);

            pw.WriteInt(chr.ID);
            pw.WriteInt(summon.SkillId);
            movePath.EncodeToPacket(pw);

            chr.Field.SendPacket(pw, chr);
        }
        public TimeStopBehaviour(AIBrain p_brain, Summon p_controller) : base(p_brain, p_controller)
        {
            m_stateMachine = new StateMachine <EState>();
            m_stateMachine.AddState(new State <EState>(EState.IDLE));
            State <EState> state = new State <EState>(EState.DO_EFFECT);

            state.AddTransition(new Transition <EState>(EState.EFFECT_DONE, p_controller.AttackingDone));
            m_stateMachine.AddState(state);
            m_stateMachine.AddState(new State <EState>(EState.EFFECT_DONE));
            m_stateMachine.ChangeState(EState.IDLE);
        }
Beispiel #15
0
        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for events, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            // Update the keyboard state
            KeyboardState state = Keyboard.GetState();

            // Check for game exit
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || state.IsKeyDown(Keys.Escape))
            {
                Exit();
            }

            // Update turn and check for win/loss
            UpdateGame();
            UpdateTurn();

            // Upate player phase
            p1.Update(gameTime, p1Field);
            p2.Update(gameTime, p2Field);

            // Update traps for hooks (EARLY TESTING)
            KeyValuePair <TrapCard, int> hookedTrap = CheckHooksP1(gameTime, p1, p2, p1Field, p2Field);

            if (hookedTrap.Key != null)
            {
                hookedTrap.Key.effect.Activate(p1, p2, p1Field, p2Field, hookedTrap.Value);
            }

            // Update selector
            selectionHandlers[selector.state].Handle(selector, p1, p2, p1Field, p2Field, state, previousState);

            // for testing, draw with 'D'
            if (state.IsKeyDown(Keys.D) && previousState.IsKeyUp(Keys.D))
            {
                DrawCard.Apply(p1, p1Field);
            }

            // Update keyboard state
            previousState = state;

            // AI starts with monster for testing
            foreach (Card card in p1Field.magicAndTrapZone)
            {
                if (card is TrapHole)
                {
                    if (p2.hand[0] is MonsterCard)
                    {
                        p1.hooks.Add(TrapHook.NORMAL_SUMMON, 0);
                        Summon.Apply(p2, p2Field, (MonsterCard)p2.hand[0], 0);
                    }
                }
            }

            base.Update(gameTime);
        }
Beispiel #16
0
    IEnumerator AegisRoutine()
    {
        boardManager.DetectSummons();
        yield return(new WaitUntil(() => boardManager.GetQueue().Count == 1));

        Summon summon = boardManager.GetQueue()[0].GetSummon();

        boardManager.SetNeutral();
        summon.ActivateBarrier();
        boardManager.ClearQueue();
    }
Beispiel #17
0
    void Awake()
    {
        TexChangeInit();
        overrideTexture = tex_Gemini;

        g_Summon = GameObject.Find("Summon");
        s_Effect = g_Summon.GetComponent <Summon>();
        g_Summon.SetActive(false);

        OnEnable();
    }
        public StationaryBehaviour(AIBrain p_brain, Summon p_controller) : base(p_brain, p_controller)
        {
            m_stateMachine = new StateMachine <EState>();
            m_stateMachine.AddState(new State <EState>(EState.IDLE));
            State <EState> state = new State <EState>(EState.ATTACKING);

            state.AddTransition(new Transition <EState>(EState.ATTACKING_DONE, p_controller.AttackingDone));
            m_stateMachine.AddState(state);
            m_stateMachine.AddState(new State <EState>(EState.ATTACKING_DONE));
            m_stateMachine.ChangeState(EState.IDLE);
        }
Beispiel #19
0
    public void SummonAt(Tile tile)
    {
        if (tile.GetComponentInChildren <Summon>())
        {
            Debug.LogWarning("Overwriting summon at column, row: " + tile.column + " " + tile.row);
        }
        Summon summon = Instantiate(entity.summonPrefab, tile.transform).GetComponent <Summon>();

        summon.SetAttack(attack);
        summon.UseHowl();
    }
Beispiel #20
0
 // Update is called once per frame
 void Update()
 {
     if(Input.GetKeyDown (KeyCode.Tab)){
         if (currentSummon == Summon.Good)
             currentSummon = Summon.Evil;
         else if(currentSummon == Summon.Evil) {
             currentSummon = Summon.None;
         }else{
             currentSummon = Summon.Good;
         }
     }
 }
Beispiel #21
0
    public Summon BuildSummon(uint summon_id, ISkillCaster caster, ISummonCaster summon_caster, ISkillTarget summon_target, SMTargetGet trigger_target_get)
    {
        Summon summon = new Summon();

        summon.Create(GameCenter.Instance.DataManager.skillSummonDB.Get(id, summon_id), m_Skill, caster, summon_caster, summon_target);

        summon.TriggerTargetsGet = trigger_target_get;

        summons.Add(summon);

        return(summon);
    }
Beispiel #22
0
        public override void Execute()
        {
            var effect   = Level.Effects.First();
            var template = MonsterRecord.GetMonster(effect.DiceMin);

            this.SummonedTree = Summon.SummonFighter(template, (sbyte)(template.GradeExist(Level.Grade) ? Level.Grade : template.LastGrade().Id),
                                                     Source, CastPoint);

            SpellLevelRecord upgradeLevel = UpgradedTreeSpellRecord.GetLevel(Level.Grade);

            Source.OnTurnStartEvt += OnTurnStarted;
        }
Beispiel #23
0
            public Trigger(Hashtable def)
            {
                this.interval  = def.GetFloat("interval");
                this.times     = def.GetFloatArray("times");
                this.distances = def.GetFloatArray("distances");

                this.damaged = def.GetBooleanArray("damaged");
                this.td      = def.GetFloatArray("td");
                this.tpadp   = def.GetFloatArray("tpadp");
                this.tpapp   = def.GetFloatArray("tpapp");
                this.ad      = def.GetFloatArray("ad");
                this.padp    = def.GetFloatArray("padp");
                this.ap      = def.GetFloatArray("ap");
                this.papp    = def.GetFloatArray("papp");

                ArrayList ar = def.GetList("extras");

                if (ar != null)
                {
                    int count = ar.Count;
                    this.extras = new float[count][];
                    for (int i = 0; i < count; i++)
                    {
                        ArrayList ari    = ( ArrayList )ar[i];
                        int       c2     = ari.Count;
                        float[]   valuei = this.extras[i] = new float[c2];
                        for (int j = 0; j < c2; j++)
                        {
                            valuei[j] = Convert.ToSingle(ari[j]);
                        }
                    }
                }

                this.fxs  = def.GetStringArray("fxs");
                this.tfxs = def.GetStringArray("tfxs");

                ar = def.GetList("summons");
                if (ar != null)
                {
                    int count = ar.Count;
                    this.summons = new Summon[count][];
                    for (int i = 0; i < count; i++)
                    {
                        ArrayList ari      = ( ArrayList )ar[i];
                        int       c2       = ari.Count;
                        Summon[]  summonss = this.summons[i] = new Summon[c2];
                        for (int j = 0; j < c2; j++)
                        {
                            summonss[j] = new Summon(( Hashtable )ari[j]);
                        }
                    }
                }
            }
Beispiel #24
0
    public IEnumerator ResolveTurnForSummon(Summon summon)
    {
        if (!summon)
        {
            yield break;
        }
        yield return(StartCoroutine(ResolveAbilityForSummon(summon)));

        yield return(StartCoroutine(ResolveAttackForSummon(summon)));

        yield return(StartCoroutine(ResolveMovementForSummon(summon)));
    }
 public void CalculateFiness(Vector2 lastpos, Summon summon)
 {
     if (endcell != null)
     {
         // Calculate penalty for touching walls
         float penalty = summon.penalty / 5;
         // The higher the score the better
         float score = Mathf.Abs((lastpos.x - endcell.gridPos.x) + Mathf.Abs(lastpos.y - endcell.gridPos.y)) - penalty;
         // Set score on the summon
         summon.score = score;
     }
 }
    // 인덱스 에러가 나는데 원인을 특정할수없음
    public void UnitDead()
    {
        checker = GameObject.Find("SummonButton").GetComponent<Summon>();
        TileUnitList tempUL = GameObject.Find("TileGenPos" + nowTile).GetComponent<TileUnitList>();
        tempCounter = tempUL.thisTileUnitList.Count;
        
                Debug.Log(tempCounter + "타일종속유닛수");
                for (int i = 0; i < tempCounter; i++)
                {

                   if ( gameObject == tempUL.thisTileUnitList[i])
                    {
                        Debug.Log(gameObject.name + "타일에서 지워진 게임오브젝트이름");

                tempUL.thisTileUnitList.RemoveAt(i);   //(tempUL.thisTileUnitList[i]);
                break;
                    }
                }

        tempCounter = checker.PlayerUnits[(int)whosUnit].Units.Count;
      
        for (int i = 0; i < tempCounter; i++)
        {
            if (gameObject ==   checker.PlayerUnits[(int)whosUnit].Units[i])
            {

                checker.PlayerUnits[(int)whosUnit].Units.RemoveAt(i);  //Remove(checker.PlayerUnits[(int)whosUnit].Units[i].gameObject);        // 죽을때 데미지 받은 오브젝트를 유닛 리스트에서 제거
                break;
            }
        }

        Animator[] dieController = gameObject.GetComponentsInChildren<Animator>();


        for (int j = 0; j < dieController.Length; j++)
        {

            dieController[j].SetBool("Die", true);  // 어차피 죽는부분이라 false로 돌릴필요없음
            Debug.Log("사망애니메이션");
        }

        Animator[] killController = checker.PlayerUnits[(int)FinishButtonClick.thisTurnPlayer].Units[NextButtonClick.unitMoveIndex].GetComponentsInChildren<Animator>();


        for (int j = 0; j < killController.Length; j++)
        {

            killController[j].SetTrigger("Kill");
            Debug.Log("죽는타이밍에 피살자를 죽이는데 성공한유닛을 승리모션 불러옴");
        }

        Destroy(gameObject, 6.0f);
    }
Beispiel #27
0
    public IEnumerator Attack(Vector3 location, Summon summon)
    {
        yield return(StartCoroutine(MoveRoutine(transform.position, location)));

        Color color = spriteR.color;

        color.a       = 0;
        spriteR.color = color;
        yield return(StartCoroutine(summon.TakeDamage()));

        Destroy(gameObject);
    }
Beispiel #28
0
 // Use this for initialization
 void Start()
 {
     checker     = GameObject.Find("SummonButton").GetComponent <Summon>();
     goldChecker = GameObject.Find("GameManager").GetComponent <GameManage>();
     bayOwner    = gameObject.GetComponent <TileType>();
     shipPos     = GameObject.Find("BoardingPosition").transform;
     shipMover   = GameObject.Find("Ship").GetComponent <NavMeshAgent>();
     for (int i = 0; i < 48; i++)
     {
         destPos.Add(GameObject.Find("ShipDest" + i).GetComponent <Transform>());
     }
 }
Beispiel #29
0
    Vector3 GetPositionRelativeToSummon()
    {
        Summon summon = transform.parent.GetComponentInChildren <Summon>();

        if (summon)
        {
            SpriteRenderer summonSpriteR = summon.GetComponent <SpriteRenderer>();
            //float summonHeight = summonSpriteR.bounds.max.y - summonSpriteR.bounds.min.y;
            Vector3 indicatorPosition = summon.transform.Find("Head Effect").transform.position;
            return(new Vector3(origPos.x, indicatorPosition.y + 0.2f));
        }
        return(origPos);
    }
Beispiel #30
0
    // Use this for initialization
    void Awake()
    {
        checker  = GameObject.Find("SummonButton").GetComponent <Summon>();
        checkNum = new int[] { 2, 3, 4, 12, 20, 22, 25, 27, 30, 37, 38, 39, 40, 41, 42, 43, 46, 47, 48 };
        indexNum = new int[] { 1, 2, 3, 4, 12, 20, 22, 25, 27, 30, 37, 38, 39, 40, 41, 42, 43, 46, 47 };
        //                     0, 1, 2, 3,  4,  5,  6,  7,  8,  9,  10, 11, 12, 13, 14, 15, 16, 17, 18,
        // 인덱스넘이 프리팹종류 순서
        // 0베이스, 1 항구,2 맵병기 , 3마나리소스, 4골드마인, 5중립요새, 6수비거점, 7힐링텐트, 8맵웨폰키, 9숲, 10공격력, 11방어력, 12이동력, 13유닛마나회복
        // 14 유닛쿨타임초기화, 15 트랩, 16 던젼, 17  마켓, 18 결투장,


        TileMaker();
    }
Beispiel #31
0
        public override void BeginTurn()
        {
            Summon controller = Controller;

            if (controller.DestroyOnTargetContact && HadTargetContact())
            {
                controller.LifeTime = 1;
            }
            if (controller.LifeTime != -1 && controller.LifeTime > 0)
            {
                controller.LifeTime--;
            }
        }
Beispiel #32
0
 private void OnEntityCastSpell(Object p_sender, EventArgs p_args)
 {
     if (p_sender == MyController)
     {
         MovingEntity movingEntity = (MovingEntity)p_sender;
         movingEntity.AttackingDone.Trigger();
         Summon summon = (Summon)p_sender;
         if (summon != null)
         {
             summon.FlushActionLog();
         }
     }
 }
Beispiel #33
0
    //THIS SUMMONS A NEW MONSTER TO BE USED AS A TOWER AND CREATES A PLAYERPREF FOR IT. THIS IS CALLED FROM AN ITEM OR ANOTHER OBJECT THAT HAS A SPECIFIC SET OF POSSIBLE SUMMON OPTIONS
    public void SummonMonster(Summon summon)
    {
        var monstersDict = GameManager.Instance.monstersData.monstersAllDict;

        var monster = Instantiate(monstersDict[summon.summonChoice.species].monsterPrefab, scrollContent.transform.position, Quaternion.identity);

        monster.GetComponent <Monster>().MonsterSummon(monster.GetComponent <Monster>().info.species);
        activeMonster       = monster.GetComponent <Monster>();
        monsterSpriteTotal += 1;
        GameManager.Instance.GetComponent <YourAccount>().account.totalMonstersCollected += 1;

        LoadMonsters();
    }
Beispiel #34
0
 Tile GetCurrentTile(int id)
 {
     return(Array.Find(tiles, (Tile tile) => {
         Summon summon = tile.GetComponentInChildren <Summon>();
         if (summon)
         {
             if (summon.GetId() == id)
             {
                 return true;
             }
         }
         return false;
     }));
 }
Beispiel #35
0
    IEnumerator ResolveMovementForStage(int stageIndex)
    {
        for (int rowIndex = 0; rowIndex < rowLimit; rowIndex++)
        {
            Tile   tile   = grid[stageIndex][rowIndex];
            Summon summon = tile.GetComponentInChildren <Summon>();
            summon?.Walk();
        }

        yield return(new WaitWhile(() => Array.Find(tiles, (Tile tile2) => {
            Summon summon = tile2.GetComponentInChildren <Summon>();
            return summon && !summon.DoneMoving() ? true : false;
        })));
    }
Beispiel #36
0
    // Use this for initialization
    void Start()
    {
        currentSummon = Summon.None;
        /*
        if (GameDirector.instance != null){
            //update variables
            goodCount = GameDirector.instance.goodCount;
            badCount = GameDirector.instance.badCount;
        }

        goodCount = PlayerPrefs.GetInt(PlayerPrefVariables.GOOD_COUNT);
        badCount = PlayerPrefs.GetInt(PlayerPrefVariables.BAD_COUNT);
        */
    }
Beispiel #37
0
    public Enemy()
    {
        Player_Name = "Warlock";
        Players_Summon = new Summon("Golem", 1, 0, 120, 10, 20, Summon.Type.EARTH);
        Player_Spell_Book = new SpellBook();

        // instead of having a spell book I want the enemy
        // to have 2 different lists of spells
        // Attack spells and defense spells
        attack_spells = new List<BaseSpell>();
        attack_spells.Add (new FireStrike());
        attack_spells.Add (new FireStrike());
        attack_spells.Add (new PoisonStrike());
        attack_spells.Add (new PoisonStrike());
        attack_spells.Add (new DarkStrike());
        attack_spells.Add (new DarkStrike());

        defense_spells = new List<BaseSpell>();
        defense_spells.Add (new PoisonShield());
        defense_spells.Add (new PoisonShield());
        defense_spells.Add (new FireShield());
        defense_spells.Add (new FireShield());
    }
Beispiel #38
0
 public override void Cast_Spell(Summon s)
 {
     base.Cast_Spell (s);
 }
Beispiel #39
0
 public SpellResults Do_Ability(Summon s)
 {
     int heal = s.Base_Health / 10 + Random.Range(0, 11);
     return new SpellResults(0, 0, heal, 0, 0, 0);
 }
Beispiel #40
0
 public SpellResults Do_Ability(Summon s)
 {
     int blk = s.Defense + Random.Range(0, 11);
     return new SpellResults(0, blk, 0, 0, 0, 0);
 }
Beispiel #41
0
 public SpellResults Do_Ability(Summon s)
 {
     int psn = Random.Range(1, 6);
     return new SpellResults(0, 0, 0, psn, 0, 0);
 }
Beispiel #42
0
 public SpellResults Do_Ability(Summon s)
 {
     int plz = Random.Range(1, 4);
     return new SpellResults(0, 0, 0, 0, 0, plz);
 }
Beispiel #43
0
 public SpellResults Do_Ability(Summon s)
 {
     int brn = Random.Range(1, 5);
     return new SpellResults(0, 0, 0, 0, brn, 0);
 }
Beispiel #44
0
 public SpellResults Do_Ability(Summon s)
 {
     int dmg = s.Strength + Random.Range(0, 11);
     return new SpellResults(dmg, 0, 0, 0, 0, 0);
 }
    public void DisplaySummonBattle(Summon redSummon, Summon blueSummon)
    {
        acceptingInput = false;
        tvCanvasScaler.BeginScaleOut();
        BattleResult result = GameState.instance.GetBattleResult(redSummon, blueSummon);
        StartCoroutine(DelayShowSummonAnimations(redSummon, blueSummon));
        StartCoroutine(DelayShowVSAnimation());
        StartCoroutine(DelayHideVSAnimation());
        StartCoroutine(DelayShowAttackAnimation(redSummon,blueSummon,result));
        StartCoroutine(DelayShowResultAnimations(result));
        StartCoroutine(DelayResetTVCanvas());

    }
 IEnumerator DelayShowSummonAnimations(Summon redSummon, Summon blueSummon)
 {
     float timeDelta = 0f;
     while (timeDelta < showSummonGrahicDelay)
     {
         timeDelta += Time.deltaTime;
         yield return null;
     }
     if (redSummon != Summon.NONE)
         redSummonAnimations.PlayAnimation((int)redSummon);
     if (blueSummon != Summon.NONE)
         blueSummonAnimations.PlayAnimation((int)blueSummon);
 }
 IEnumerator DelayShowAttackAnimation(Summon redSummon, Summon blueSummon, BattleResult result)
 {
     float timeDelta = 0f;
     while (timeDelta < showAttackGraphicDelay)
     {
         timeDelta += Time.deltaTime;
         yield return null;
     }
     if (result != BattleResult.Draw)
     {
         attackAnimations.PlayAnimation((int)(result == BattleResult.RedVictory ? redSummon : blueSummon));
     }
 }
Beispiel #48
0
 public override void Cast_Spell(Summon s)
 {
     base.Cast_Spell(s);
     s.Reflect = 0;
 }
Beispiel #49
0
 /*
  * True if summon can use this spell
  * otherwise false
  */
 public bool Can_Use(Summon s)
 {
     if (strength_req > s.Strength)
         return false;
     if (defense_req > s.Defense)
         return false;
     if (health_req > s.Health)
         return false;
     return true;
 }
Beispiel #50
0
 public SpellResults Do_Ability(Summon s)
 {
     int dmg = (s.Strength + Random.Range(0, 6))* s.Combo;
     return new SpellResults(dmg, 0, 0, 0, 0, 0);
 }
Beispiel #51
0
 public virtual void Cast_Spell(Summon s)
 {
     results = new SpellResults(0, 0, 0, 0, 0, 0);
     foreach(Ability a in abilities)
     {
         results += a.Do_Ability(s);
     }
 }
Beispiel #52
0
 private void Setup_Summon()
 {
     if(vampire_toggle.GetComponent<Toggle>().isOn)
     {
         starter_summon = new Summon("Vampire", 1, 0, 60, 3, 3, Summon.Type.DARK);
     }
     else if (paladin_toggle.GetComponent<Toggle>().isOn)
     {
         starter_summon = new Summon("Paladin", 1, 0, 50, 4, 4, Summon.Type.LIGHT);
     }
     else if (phoenix_toggle.GetComponent<Toggle>().isOn)
     {
         starter_summon = new Summon("Phoenix", 1, 0, 40, 6, 3, Summon.Type.FIRE);
     }
     else if (golem_toggle.GetComponent<Toggle>().isOn)
     {
         starter_summon = new Summon("Golem", 1, 0, 40, 3, 6, Summon.Type.EARTH);
     }
 }
Beispiel #53
0
 public override void Cast_Spell(Summon s)
 {
     base.Cast_Spell(s);
     s.Curse = 0;
 }
Beispiel #54
0
 public SpellResults Do_Ability(Summon s)
 {
     int dmg = s.Reflect;
     return new SpellResults(dmg, 0, 0, 0, 0, 0);
 }