Example #1
0
    public void Test_AffixInteraction()
    {
        TestAffix1 testAffix1 = new TestAffix1();

        testAffix1.InitAffix();

        ActionData.AFFIX_DICTIONARY.Add(ActionData.AFFIX_LIST_ID.TEST_AFFIX_1, testAffix1);

        TestAction1 testAction1 = new TestAction1();

        testAction1.SetInitPropertiesSelfTarget();

        ActionData.ABILITY_DICTIONARY.Add(ActionData.ACTION_LIST_ID.ATTACK_BASIC, testAction1);

        Test_ListAllAffixesInDictionary();

        TestCharacter testChar1 = new TestCharacter();

        testChar1.InitChar(true);

        TestCharacter testChar2 = new TestCharacter();

        testChar2.InitChar(false);
        testChar2.m_Character.SetCharacterName("Enemy Test");

        GetPlayerManager.AddCharacterToList(testChar1.m_Character);
        GetPlayerManager.AddCharacterToList(testChar2.m_Character);



        PerformActionDataModel testDataModel = new PerformActionDataModel(ActionData.ACTION_LIST_ID.ATTACK_BASIC, GenericActionModel.ACTION_TARGET_AMOUNT.SINGLE_TARGET, testChar1.m_Character, testChar2.m_Character);

        GetCombatManager.ProcessAction(testDataModel);

        for (int i = 0; i < GetPlayerManager.GetCharacterList().Count; i++)
        {
            Debug.Log("Health - " + GetPlayerManager.GetCharacterList()[i].GetCharacterName() + " : " + GetPlayerManager.GetCharacterList()[i].GetCharacterHealth());
        }

        GetCombatManager.ProcessAffix();

        Debug.Log("Affixes Processed");

        for (int i = 0; i < GetPlayerManager.GetCharacterList().Count; i++)
        {
            Debug.Log("Health - " + GetPlayerManager.GetCharacterList()[i].GetCharacterName() + " : " + GetPlayerManager.GetCharacterList()[i].GetCharacterHealth());
        }

        Debug.Log("Test Case Over");
    }
Example #2
0
    public void Test_AddAllSkillsToList()
    {
        Debug.Log("Adding skill to the master list");

        //Need better way of doing this if possible...
        //Come into play possibly with factory and parameters to adjust for it
        TestAction1 testAction1 = new TestAction1();

        testAction1.SetInitProperties();

        //Maybe put checks around this master list?
        ActionData.ABILITY_DICTIONARY.Add(ActionData.ACTION_LIST_ID.ATTACK_BASIC, testAction1);

        //Self target
        TestAction1 testAction2 = new TestAction1();

        testAction2.SetInitPropertiesSelfTarget();

        ActionData.ABILITY_DICTIONARY.Add(ActionData.ACTION_LIST_ID.SHIELD_ONE, testAction2);

        //Multi Target All
        TestActionMulti testActionOffensive = new TestActionMulti();

        testActionOffensive.SetInitPropertiesAll();

        ActionData.ABILITY_DICTIONARY.Add(ActionData.ACTION_LIST_ID.ATTACK_ONE, testActionOffensive);


        //Multi Target Offensive
        TestActionMulti testActionMultiOffensive = new TestActionMulti();

        testActionMultiOffensive.SetInitPropertiesOffensive();

        ActionData.ABILITY_DICTIONARY.Add(ActionData.ACTION_LIST_ID.ATTACK_TWO, testActionMultiOffensive);

        //Multi Target Defensive
        TestActionMulti testActionMultiDefensive = new TestActionMulti();

        testActionMultiDefensive.SetInitPropertiesDefensive();

        ActionData.ABILITY_DICTIONARY.Add(ActionData.ACTION_LIST_ID.SHIELD_TWO, testActionMultiDefensive);
    }
Example #3
0
    public void Test_UIAndCharacterInteraction()
    {
        //Test_CharacterInteraction1();
        //Test_ListAllAbilitiesInDictionary();
        //Test_ActionInteraction();
        //Test_AffixInteraction();

        TestCharacter testChar = new TestCharacter();

        testChar.InitChar(true);

        TestCharacter testChar2 = new TestCharacter();

        testChar2.InitChar(false);


        TestAffix1 testAffix1 = new TestAffix1();

        testAffix1.InitAffix();

        ActionData.AFFIX_DICTIONARY.Add(ActionData.AFFIX_LIST_ID.TEST_AFFIX_1, testAffix1);

        TestAction1 testAction1 = new TestAction1();

        testAction1.SetInitPropertiesSelfTarget();

        ActionData.ABILITY_DICTIONARY.Add(ActionData.ACTION_LIST_ID.ATTACK_BASIC, testAction1);

        TestAction1 testAction2 = new TestAction1();

        testAction2.SetInitPropertiesSelfTarget();
        testAction2.SetName("Action 2 Test");
        ActionData.ABILITY_DICTIONARY.Add(ActionData.ACTION_LIST_ID.ATTACK_ONE, testAction2);

        TestAction1 testAction3 = new TestAction1();

        testAction3.SetInitPropertiesSelfTarget();
        testAction3.SetName("Action 3 Test");
        ActionData.ABILITY_DICTIONARY.Add(ActionData.ACTION_LIST_ID.ATTACK_TWO, testAction3);

        TestAction1 testAction4 = new TestAction1();

        testAction4.SetInitPropertiesSelfTarget();
        testAction4.SetName("Action 4 Test");
        ActionData.ABILITY_DICTIONARY.Add(ActionData.ACTION_LIST_ID.ATTACK_THREE, testAction4);

        TestAction1 testAction5 = new TestAction1();

        testAction5.SetInitPropertiesSelfTarget();
        testAction5.SetName("Action 5 Test");
        ActionData.ABILITY_DICTIONARY.Add(ActionData.ACTION_LIST_ID.ATTACK_FOUR, testAction5);

        GetPlayerManager.AddCharacterToList(testChar.m_Character);
        GetPlayerManager.AddCharacterToList(testChar2.m_Character);

        m_CombatManager.m_CurrentPlayer = testChar.m_Character;

        //PerformActionDataModel testDataModel = new PerformActionDataModel(ActionData.ACTION_LIST_ID.ATTACK_BASIC, GenericActionModel.ACTION_TARGET_AMOUNT.SINGLE_TARGET, testChar.m_Character, testChar2.m_Character);

        //GetCombatManager.ProcessAction(testDataModel);

        cbIntTest.CreateCharacterInformationDisplay(testChar.m_Character);
        cbIntTest.CreateCharacterInformationDisplay(testChar2.m_Character);
    }