public static void OrcBarbarian(Character c, Action a)
    {
        //non player character
        c.setExpGive(300);
        c.setFriendly(false);
        c.setTalk(new Talk("hello", false, 0));

        //character
        c.setRace(EnumList.Race.Orc);
        c.setAlignment(EnumList.Alignment.Evil);
        c.setAffiliation(EnumList.Affiliation.RaGrobash);
        c.setTitle(EnumList.Title.None);
        c.setCharacterClass1(EnumList.CharacterClass.Barbarian);
        c.setCharacterClass2(EnumList.CharacterClass.None);
        c.setPrestigeClass(EnumList.CharacterClass.None);

        //entity
        c.setName("Orc Barbarian");
        c.setLevel1(4);
        c.setLevel2(0);
        c.setPrestigeLevel(0);
        c.setTotalLevel(4);
        c.setStrength(20);
        c.setDexterity(12);
        c.setConstitution(16);
        c.setIntelligence(6);
        c.setWisdom(7);
        c.setCharisma(9);
        c.setInitiativeBonus(2);
        c.setHostile(false);
        c.setInitSet(false);
        c.setTurn(false);
        c.setDone(false);
        c.setInitiative(0);
            int[] basicAttackBonus = {4, 0, 0, 0};
        c.setBasicAttackBonus(basicAttackBonus);
        c.setFortitude(2);
        c.setReflex(2);
        c.setWill(0);
        c.setSkillPoints(0);
        c.setInventory(new Inventory(new Equipment()));
        c.setStatus(EnumList.Status.Normal);

        //attackable
        c.setCurrentHealth(14);
        c.setMaxHealth(14);
        c.setArmorClass(1);

        //action
        a.setStandardAction(1);
        a.setMoveAction(1);
        a.setFreeAction(1);
        a.setSwiftAction(1);
        a.setImmediateAction(1);
        a.setAoo(1);
        a.setCurrentSpeed(60);
        a.setMaxSpeed(60);
    }
Exemplo n.º 2
0
    public void LoadToCharacter(Character c, Action a)
    {
        //controlled
        c.setScene(scene);
        c.setSlot(slot);
        c.setWorld(world);
        c.setLevelUpsAvailable(levelUpsAvailable);
        c.setExperience(experience);
        c.setHitDie(hitDie);

        //!controlled
        c.setExpGive(expGive);
        c.setFriendly(friendly);
        c.setTalk(talk);

        //character
        c.setRace(race);
        c.setAlignment(alignment);
        c.setAffiliation(affiliation);
        c.setProfession(profession);
        c.setTitle(title);
        c.setCharacterClass1(characterClass1);
        c.setCharacterClass2(characterClass2);
        c.setPrestigeClass(prestigeClass);
        c.setControlled(controlled);

        //entity
        c.setName(name);
        c.setLevel1(level1);
        c.setLevel2(level2);
        c.setPrestigeLevel(prestigeLevel);
        c.setTotalLevel(totalLevel);
        c.setStrength(strength);
        c.setDexterity(dexterity);
        c.setConstitution(constitution);
        c.setIntelligence(intelligence);
        c.setWisdom(wisdom);
        c.setCharisma(charisma);
        c.setInitiativeBonus(initiativeBonus);
        c.setHostile(hostile);
        c.setInitSet(initSet);
        c.setTurn(turn);
        c.setDone(done);
        c.setInitiative(initiative);
        c.setBasicAttackBonus(basicAttackBonus);
        c.setFortitude(fortitude);
        c.setReflex(reflex);
        c.setWill(will);
        c.setSkill(skill);
        c.setFeat(feat);
        c.setSkillPoints(skillPoints);
        c.setFeatPoints(featPoints);
        c.setClassSkill(classSkill);
        c.setLocation(xLocation, yLocation);
        c.setDirection(xDirection, yDirection);
        c.setInventory(inventory);
        c.setStatus(status);

        //attackable
        c.setCurrentHealth(currentHealth);
        c.setMaxHealth(maxHealth);
        c.setArmorClass(armorClass);
        c.setPrefabName(prefabName);

        //action
        a.setStandardAction(standardAction);
        a.setMoveAction(moveAction);
        a.setFreeAction(freeAction);
        a.setSwiftAction(swiftAction);
        a.setImmediateAction(immediateAction);
        a.setAoo(aoo);
        a.setCurrentSpeed(currentSpeed);
        a.setMaxSpeed(maxSpeed);
        a.setMoveLock(moveLock);
        a.setAooProvoked(aooProvoked);
        a.setEnd(xEnd, yEnd);
        a.setDir(xDir, yDir);
    }
Exemplo n.º 3
0
 public void LoadToAction(Action a)
 {
     a.setStandardAction(standardAction);
     a.setMoveAction(moveAction);
     a.setFreeAction(freeAction);
     a.setSwiftAction(swiftAction);
     a.setImmediateAction(immediateAction);
     a.setAoo(aoo);
     a.setCurrentSpeed(currentSpeed);
     a.setMaxSpeed(maxSpeed);
     a.setMoveLock(moveLock);
     a.setAooProvoked(aooProvoked);
     a.setEnd(xEnd, yEnd);
     a.setDir(xDir, yDir);
 }
Exemplo n.º 4
0
 private void Update()
 {
     if(!off) {
         switch(state) {
         case State.Free:
             FreeTime.on = true;
             if(getPause()) {
                 formerState = State.Free;
                 state = State.Pause;
             }
             fighterList.Clear();
             fighterQ.Clear();
             fightBegan = false;
             if(inCombat()) {
                 state = State.Initiative;
             }
             break;
         case State.Initiative:
             FreeTime.on = false;
             if(getPause()) {
                 formerState = State.Initiative;
                 state = State.Pause;
             }
             if(!inCombat()) {
                 state = State.Free;
             }
             foreach(GameObject c in characterList) {
                 try {
                     e = c.GetComponent<Entity>();
                 } catch (Exception exception) {
                     //
                 }
                 if(e.getHostile()) {
                     c.GetComponent<Action>().setMoveLock(true);
                     if(!e.getInitSet()) {
                         int init = Random.Range(1,21)+e.dexterityModifier()+e.getInitiativeBonus();
                         e.setInitiative(init);
                         e.setInitSet(true);
                         fighterList.Add(c);
                         if(fightBegan) {
                             fighterQ.Enqueue(c);
                         }
                     }
                 }
             }
             listCount = fighterList.Count;
             fighterList.Sort(delegate(GameObject a, GameObject b) {
                 return (a.GetComponent<Entity>().getInitiative()).CompareTo(b.GetComponent<Entity>().getInitiative());
             });
             fighterList.Reverse();
             foreach(GameObject f in fighterList) {
                 if(!fightBegan) {
                     fighterQ.Enqueue(f);
                 }
             }
             state = State.TurnSetup;
             break;
         case State.TurnSetup:
             FreeTime.on = false;
             if(getPause()) {
                 formerState = State.TurnSetup;
                 state = State.Pause;
             }
     /* 			if(!inCombat()) {
                 state = State.Free;
             } */
             if(getUninit()) {
                 state = State.Initiative;
             }
             getFighter();
             a = fighter.GetComponent<Action>();
             a.setMoveLock(false);
             a.maximizeSpeed();
             a.resetActions();
             a.setImmediateAction(1);
             e = fighter.GetComponent<Entity>();
             e.setTurn(true);
             e.setDone(false);
             state = State.Turn;
             break;
         case State.Turn:
             FreeTime.on = false;
             fightBegan = true;
             if(getPause()) {
                 formerState = State.Turn;
                 state = State.Pause;
             }
             if(!inCombat()) {
                 state = State.Free;
             }
             if(getUninit()) {
                 goToInit = true;
             }
             e = fighter.GetComponent<Entity>();
             a = fighter.GetComponent<Action>();
             a.setMoveLock(false);
             if(e.getDone()) {
                 e.setTurn(false);
                 a.setMoveLock(true);
                 if(goToInit) {
                     goToInit = false;
                     state = State.Initiative;
                 } else {
                     state = State.TurnSetup;
                 }
             }
             break;
         case State.Pause:
             FreeTime.on = false;
             foreach(GameObject g in characterList) {
                 g.GetComponent<Action>().setMoveLock(true);
             }
             if(!getPause()) {
                 foreach(GameObject g in characterList) {
                     g.GetComponent<Action>().setMoveLock(false);
                 }
                 state = formerState;
             }
             break;
         default:
             state = State.Free;
             break;
         }
     } else {
         state = State.Free;
         formerState = State.Free;
     }
 }