예제 #1
0
    public void Test_CharacterInteraction1()
    {
        TestCharacter testCharacter = new TestCharacter();

        testCharacter.InitChar(true);
        GetPlayerManager.AddCharacterToList(testCharacter.m_Character);

        Debug.Log("Test Character made and added to the character list");
        Debug.Log(testCharacter.m_Character.GetCharacterName() + ": has health stat of " + testCharacter.m_Character.GetCharacterHealth());

        testCharacter.m_Character.ListUsableActions();
    }
예제 #2
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");
    }
예제 #3
0
    public void Test_CharacterInteraction2()
    {
        TestCharacter testChar1 = new TestCharacter();

        testChar1.InitChar(true);

        TestCharacter testChar2 = new TestCharacter();

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

        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);
    }
예제 #4
0
    public void Test_ActionInteraction()
    {
        TestCharacter testChar1 = new TestCharacter();

        testChar1.InitChar(true);
        testChar1.m_Character.SetCharacterName("Player");

        TestCharacter testChar2 = new TestCharacter();

        testChar2.InitChar(false);

        TestCharacter testChar3 = new TestCharacter();

        testChar3.InitChar(false);

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

        PerformActionDataModel testActionSelfTarget     = new PerformActionDataModel(ActionData.ACTION_LIST_ID.SHIELD_ONE, GenericActionModel.ACTION_TARGET_AMOUNT.SINGLE_TARGET, testChar1.m_Character);
        PerformActionDataModel testActionAllTarget      = new PerformActionDataModel(ActionData.ACTION_LIST_ID.ATTACK_ONE, GenericActionModel.ACTION_TARGET_AMOUNT.ALL_TARGETS, testChar1.m_Character);
        PerformActionDataModel testActionMultiOffensive = new PerformActionDataModel(ActionData.ACTION_LIST_ID.ATTACK_TWO, GenericActionModel.ACTION_TARGET_AMOUNT.MULTI_TARGET_OFFENSIVE, testChar1.m_Character);
        PerformActionDataModel testActionMultiDefensive = new PerformActionDataModel(ActionData.ACTION_LIST_ID.SHIELD_TWO, GenericActionModel.ACTION_TARGET_AMOUNT.MULTI_TARGET_DEFENSIVE, testChar1.m_Character);

        GetCombatManager.ProcessAction(testActionSelfTarget);
        GetCombatManager.ProcessAction(testActionAllTarget);
        GetCombatManager.ProcessAction(testActionMultiOffensive);
        GetCombatManager.ProcessAction(testActionMultiDefensive);

        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");
    }
예제 #5
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);
    }