Пример #1
0
    //return whether or not the spell travels.  It is needed if the spell needs to be placed on the floor
    public bool doesSpellTravel(SPELLS s)
    {
        switch (s)
        {
        case SPELLS.red:
            if (redSpell.name == "Lava")
            {
                return(false);
            }
            return(false);

        case SPELLS.blue:
            if (blueSpell.name == "HealthPool")
            {
                return(false);
            }
            return(false);

        case SPELLS.green:
            if (greenSpell.name == "ClearPath")
            {
                return(true);
            }
            return(false);

        case SPELLS.trap:
            return(false);

        default:
            return(false);
        }
    }
Пример #2
0
        public void RemoveSpellsFromCharacter()
        {
            var selectedSpells = _view.CharacterSpellsListBox.SelectedItems.Cast <SPELLS>().ToList();

            foreach (var spell in selectedSpells)
            {
                var spellToRemoveFromCharacter = new SPELLS
                {
                    s_id              = spell.s_id,
                    s_name            = spell.s_name,
                    s_school          = spell.s_school,
                    s_level           = spell.s_level,
                    s_castingtime     = spell.s_castingtime,
                    s_range           = spell.s_range,
                    s_target          = spell.s_target,
                    s_component_m     = spell.s_component_m,
                    s_component_s     = spell.s_component_s,
                    s_component_v     = spell.s_component_v,
                    s_isconcentration = spell.s_isconcentration,
                    s_durationminutes = spell.s_durationminutes,
                    s_description     = spell.s_description
                };

                _loadedSpells.Add(spellToRemoveFromCharacter);

                _loadedCharacterSpells.Remove(_loadedCharacterSpells.First(x => x.s_id == spellToRemoveFromCharacter.s_id));
            }

            UpdateSpellsSelection(selectedSpells);

            UpdateSpellDescription(true);
        }
Пример #3
0
 public void EquipSpell(int index, int number)
 {
     spellSlots[number] = spells.get(index);
     spells.remove(index);
     if (curSpell == null)
     {
         curSpell    = spellSlots[number];
         curSpellPos = number;
     }
 }
Пример #4
0
 //set up a specific spell's cost
 public void setUpSpellCost(SPELLS c, int cost)
 {
     if (spellCost[c] != null)
     {
         spellCost.Add(c, cost);
     }
     else
     {
         spellCost.Remove(c);
         spellCost.Add(c, cost);
     }
 }
Пример #5
0
    void Start()
    {
        string[] abl_N       = { "", "", "", "", "", "" };
        WEAPONS  fallenSword = new WEAPONS("Fallen Sword", 10, 5, 0, 0, 0, 0, 0, 0, false, false, 0, 1.7f, WEAPONS.weaponType.Edge, WEAPONS.weaponClass.Sword, true, 0, 0.45f, 2.2f);
        Classes  novice      = new Classes("Novice", "The start of everything", fallenSword, null, 0, 1, 3, abl_N);

        SPELLS fireBall  = new SPELLS(false, false, "Fire Ball", "Cast a huge fire with this spell.", 0, 0, 1, SPELLS.SpellType.Fire, SPELLS.AtkType.Attack, 10, 0, 0);
        SPELLS magicMiss = new SPELLS(false, false, "Magic Missile", "Cast magic missile with this spell.", 0, 0, 1, SPELLS.SpellType.Magic, SPELLS.AtkType.Attack, 0, 10, 0);


        GameObject.FindGameObjectWithTag("Player").GetComponent <Equip>().FindEmpty(novice, false);
        GameObject.FindGameObjectWithTag("Player").GetComponent <Equip>().mask = GameObject.FindGameObjectWithTag("Player").GetComponent <Equip>().Mask.get(0);
        GameObject.FindGameObjectWithTag("Player").GetComponent <Equip>().FindEmpty(fireBall, true);
        GameObject.FindGameObjectWithTag("Player").GetComponent <Equip>().FindEmpty(magicMiss, true);
        //GameObject.FindGameObjectWithTag ("MasterSave").GetComponent<UltraSave> ().SavePlayer ();
    }
Пример #6
0
    //cast the spell at/towards the casting point
    public void cast(SPELLS spellToCast, Vector3 castPoint)
    {
        switch (spellToCast)
        {
        case SPELLS.red:
            if (redSpell.name == "Lava")
            {
                Instantiate(redSpell, castPoint + redSpell.GetComponent <Lava>().offSet, Quaternion.identity);
            }
            break;

        case SPELLS.blue:
            if (blueSpell.name == "HealthPool")
            {
                Instantiate(blueSpell, castPoint + blueSpell.GetComponent <HealthPool>().offSet, Quaternion.identity);
            }
            break;

        case SPELLS.green:
            if (greenSpell.name == "ClearPath")
            {
                GameObject cp = Instantiate(greenSpell, transform.position + new Vector3(0, 0.5f, 0), Quaternion.identity) as GameObject;
                cp.GetComponent <ClearPath>().setTravelPoint(castPoint);
            }
            break;

        case SPELLS.trap:
            if (trapSpell.name == "Mine")
            {
                Instantiate(trapSpell, castPoint + trapSpell.GetComponent <Mine>().offSet, Quaternion.identity);
            }
            if (trapSpell.name == "Spikes")
            {
                Instantiate(trapSpell, castPoint + trapSpell.GetComponent <Spikes>().offSet, Quaternion.identity);
            }
            break;

        default:
            print("ERROR:  No spell was selected to cast.");
            break;
        }
    }
Пример #7
0
    //return the current energy of the spell
    public int checkEnergy(SPELLS color)
    {
        switch (color)
        {
        case (SPELLS.red):
            return(redEnergy);

        case (SPELLS.blue):
            return(blueEnergy);

        case (SPELLS.green):
            return(greenEnergy);

        case (SPELLS.trap):
            return(trapEnergy);

        default:
            return(0);
        }
    }
Пример #8
0
    //Get the torch prefab
    public GameObject getTorch(SPELLS color)
    {
        switch (color)
        {
        case SPELLS.red:
            return(redTorch);

        case SPELLS.blue:
            return(blueTorch);

        case SPELLS.green:
            return(greenTorch);

        case SPELLS.trap:
            return(genericLight);

        default:
            return(redTorch);
        }
    }
Пример #9
0
    //return the selected spell
    public GameObject getSelectedSpell(SPELLS color)
    {
        switch (color)
        {
        case SPELLS.red:
            return(redSpell);

        case SPELLS.blue:
            return(blueSpell);

        case SPELLS.green:
            return(greenSpell);

        case SPELLS.trap:
            return(trapSpell);

        default:
            return(trapSpell);
        }
    }
Пример #10
0
    //Get the minimum distance the spell must be cast away from the player in order to prevent self-mutilation
    public float getSpellMinDistance(SPELLS s)
    {
        switch (s)
        {
        case SPELLS.red:
            if (redSpell.name == "Lava")
            {
                return(redSpell.GetComponent <Lava>().radius + playerRadius);
            }
            return(0.0f);

        case SPELLS.blue:
            if (blueSpell.name == "HealthPool")
            {
                return(blueSpell.GetComponent <HealthPool>().radius);
            }
            return(0.0f);

        case SPELLS.green:
            if (greenSpell.name == "ClearPath")
            {
                return(greenSpell.GetComponent <ClearPath>().radius);
            }
            return(0.0f);

        case SPELLS.trap:
            if (trapSpell.name == "Mine")
            {
                return(trapSpell.GetComponent <Mine>().radius + playerRadius);
            }
            if (trapSpell.name == "Spikes")
            {
                return(trapSpell.GetComponent <Spikes>().radius + playerRadius);
            }
            return(0.0f);

        default:
            return(0.0f);
        }
    }
Пример #11
0
    void Start()
    {
        //Default to the trap spell.
        selectedSpell = SPELLS.trap;

        TORCHHANDLER  = GetComponent <TorchHandler>();
        SPELLMANAGER  = GetComponent <SpellManager>();
        PLAYERMANAGER = GetComponent <PlayerManager>();

        //A cooldown references the spell, a countdown until recast, if it has been cast, and its cooldown time.
        cdTracker = new Hashtable();
        cdTracker[SPELLMANAGER.redSpell]     = new Cooldown(SPELLMANAGER.redSpell, 1.0f);
        cdTracker[SPELLMANAGER.blueSpell]    = new Cooldown(SPELLMANAGER.blueSpell, 1.0f);
        cdTracker[SPELLMANAGER.greenSpell]   = new Cooldown(SPELLMANAGER.greenSpell, 1.0f);
        cdTracker[SPELLMANAGER.trapSpell]    = new Cooldown(SPELLMANAGER.trapSpell, 1.0f);
        cdTracker[TORCHHANDLER.redTorch]     = new Cooldown(TORCHHANDLER.redTorch, 1.0f);
        cdTracker[TORCHHANDLER.blueTorch]    = new Cooldown(TORCHHANDLER.blueTorch, 1.0f);
        cdTracker[TORCHHANDLER.greenTorch]   = new Cooldown(TORCHHANDLER.greenTorch, 1.0f);
        cdTracker[TORCHHANDLER.genericLight] = new Cooldown(TORCHHANDLER.genericLight, 1.0f);

        lMask = ~lMask;
    }
Пример #12
0
    void Update()
    {
        //Reference Unity's input manager to select a spell.
        if (Input.GetButtonDown("QSpell"))
        {
            selectedSpell = SPELLS.red;
        }
        if (Input.GetButtonDown("ESpell"))
        {
            selectedSpell = SPELLS.blue;
        }
        if (Input.GetButton("ZSpell"))
        {
            selectedSpell = SPELLS.green;
        }
        if (Input.GetButton("CSpell"))
        {
            selectedSpell = SPELLS.trap;
        }

        //Increment the cooldowns.  Probably should be done elsewhere.
        if (cdTracker.Values.Count > 0)
        {
            foreach (Cooldown g in cdTracker.Values)
            {
                if (g.isCasting)
                {
                    g.countdown += Time.deltaTime;
                }
                if (g.countdown >= g.cooldownTime)
                {
                    print(g.spell.name + " is off cooldown");
                    g.isCasting = false;
                    g.countdown = 0.0f;
                }
            }
        }
    }
Пример #13
0
    //change the current energy of the spell
    public void changeEnergy(SPELLS color, int amount)
    {
        switch (color)
        {
        case (SPELLS.red):
            redEnergy += amount;
            break;

        case (SPELLS.blue):
            blueEnergy += amount;
            break;

        case (SPELLS.green):
            greenEnergy += amount;
            break;

        case (SPELLS.trap):
            trapEnergy += amount;
            break;

        default:
            break;
        }
    }
Пример #14
0
    //Place a torch from InputManager by finding it in the torches list then altering its scale, then unequip it
    public void placeTorch(SPELLS torchColor, Vector3 clickPoint)
    {
        if (torchColor == SPELLS.trap)
        {
            print("ERROR:  Passed in a trap (not a torch)to the torch placer.");
            return;
        }

        //by referencing the prefab we can find exactly which torch we need in the torches list
        GameObject torchToPlace = getTorch(torchColor);
        int        torchIndex   = getTorchIndex(torchToPlace, torchPrefabs);

        if (torchIndex == -1)
        {
            print("ERROR:  Could not find " + torchToPlace.name + " in the prefab list");
            return;
        }
        //set the scale for the real world
        Transform parent = torches[torchIndex].transform.parent;
        float     x      = torches[torchIndex].transform.localScale.x,
                  y      = torches[torchIndex].transform.localScale.y,
                  z      = torches[torchIndex].transform.localScale.z;

        while (parent != null)
        {
            x     *= (1 / parent.transform.localScale.x);
            y     *= (1 / parent.transform.localScale.y);
            z     *= (1 / parent.transform.localScale.z);
            parent = parent.transform.parent;
        }

        //Unequip the torch
        Torch t = torches[torchIndex].GetComponent("Torch") as Torch;

        t.unEquip(new Vector3(x, y, z), clickPoint, Vector3.zero);
    }
Пример #15
0
 public int getSpellCost(SPELLS s)
 {
     return((int)spellCost[s]);
 }
Пример #16
0
    void Start()
    {
        //Armor
        //bool buyable, bool sellable, string name, string description,EquipRegion slot, int buyPrice, int sellPrice,
        //int meleeDefense, int magicDefense,int fireDefense, int artDefense
//		MASK fallenMask = new MASK(false,false,"Fallen Mask","A mask from a fallen friend",
//		                             10,1,5,0,0,0,0,3,0,0,0,0,0);
//		MASK PerfectMask = new MASK(false,false,"Perfect Mask","The ultimate mask",
//		                           10,1,5,0,0,0,5,5,5,5,5,5,5);
//		ARMOR LeatherShirt = new ARMOR(false,true,"Leather Shirt","A worn down white shirt",ITEMS.EquipRegion.ChestSlot,
//		                           10,1,5,0,0,0,24);
//		ARMOR LeatherPants = new ARMOR(false,true,"Leather Pants","A worn down brown pants",ITEMS.EquipRegion.LegSlot,
//		                               10,1,5,0,0,0,13);
        WEAPONS Axe = new WEAPONS(false, true, "Hatchet", "Worn down hatchet", ITEMS.Type.Weapon
                                  , 100, 20, 12, 0, 0, 0, false, WEAPONS.scaleBonus.Str, true, 20, 2f, WEAPONS.weaponType.Edge
                                  , 4, 1, 0, 0, 'C', WEAPONS.weaponClass.Axe, true, 0, 0.60f, .5f);
        WEAPONS fallenSword = new WEAPONS(false, true, "Fallen Sword", "Broken Sword from a friend", ITEMS.Type.Weapon
                                          , 10, 1, 10, 0, 0, 0, false, WEAPONS.scaleBonus.Str, false, 15, 2f, WEAPONS.weaponType.Edge
                                          , 3, 2, 0, 0, 'C', WEAPONS.weaponClass.Sword, true, 0, 0.60f, 0f);
        WEAPONS sheild = new WEAPONS(false, true, "Broken Sheild", "Worn down sheild", ITEMS.Type.Weapon
                                     , 250, 50, 95, 50, 50, 50, true, WEAPONS.scaleBonus.none, false, 0, 0f, WEAPONS.weaponType.Blunt
                                     , 0, 0, 0, 0, 'C', WEAPONS.weaponClass.Sheild, false, 0, 0f, 0f);
        WEAPONS FireGem = new WEAPONS(false, true, "Fire Gem", "Gem that allows you to control fire.", ITEMS.Type.Weapon
                                      , 250, 50, 0, 20, 0, 0, true, WEAPONS.scaleBonus.Int, false, 5, 0f, WEAPONS.weaponType.Magic
                                      , 0, 0, 0, 4, 'C', WEAPONS.weaponClass.Gem, false, 0, 0.60f, 0f);
        WEAPONS MagicGem = new WEAPONS(false, true, "Magic Gem", "Gem that allows you to control Magic.", ITEMS.Type.Weapon
                                       , 250, 50, 0, 0, 20, 0, true, WEAPONS.scaleBonus.Int, false, 5, 0f, WEAPONS.weaponType.Magic
                                       , 0, 0, 0, 4, 'C', WEAPONS.weaponClass.Gem, false, 0, 0.60f, 0f);
        WEAPONS ArtGem = new WEAPONS(false, true, "Artificial Gem", "Gem that allows you to control lightning.", ITEMS.Type.Weapon
                                     , 250, 50, 0, 0, 0, 20, true, WEAPONS.scaleBonus.Int, false, 5, 0f, WEAPONS.weaponType.Magic
                                     , 0, 0, 0, 4, 'C', WEAPONS.weaponClass.Gem, false, 0, 0.60f, 0f);
        WEAPONS GreatSword = new WEAPONS(true, true, "Great Sword", "Broken Great Sword from a friend", ITEMS.Type.Weapon
                                         , 20, 1, 25, 0, 0, 0, false, WEAPONS.scaleBonus.Str, true, 30, 2f, WEAPONS.weaponType.Edge
                                         , 5, 2, 0, 0, 'C', WEAPONS.weaponClass.GreatSword, true, 0, 1.1f, 1.5f);
        WEAPONS staff = new WEAPONS(true, true, "Wooden Staff", "An Elder Staff forged from the great wood trees.", ITEMS.Type.Weapon
                                    , 2000, 1, 0, 20, 5, 5, false, WEAPONS.scaleBonus.Int, true, 5, 3f, WEAPONS.weaponType.Magic
                                    , 0, 0, 0, 5, 'A', WEAPONS.weaponClass.Staff, false, 0, 0.60f, 0f);
        //		WEAPONS Hammer = new WEAPONS(false,true,"Hammer","Old Hammer",ITEMS.EquipRegion.LeftHandSlot,ITEMS.Type.Weapon
//		                             ,500,100,20,0,0,0,false,WEAPONS.scaleBonus.Str,true,50,2f,WEAPONS.weaponType.Blunt
//		                             ,12,0,0,'A',WEAPONS.weaponClass.Hammer,true,0);
//		GRIMOIRE book = new GRIMOIRE(true,true,"Fire Grimoire","Old dusty book",5,1,0,5,0,0,0,0,5,'C',0,GRIMOIRE.BookType.Fire);
        WEAPONS Gun = new WEAPONS(false, true, "Old Pistol", "A pistol that barely works", ITEMS.Type.Weapon
                                  , 10, 1, 5, 0, 0, 0, true, WEAPONS.scaleBonus.Pre, true, 15, 10f, WEAPONS.weaponType.Pierce
                                  , 0, 0, 2, 0, 'C', WEAPONS.weaponClass.Gun, false, 0, 0.60f, 0f);
//		WEAPONS poke = new WEAPONS(false,true,"Rapier","Worn down rapier",ITEMS.EquipRegion.LeftHandSlot,ITEMS.Type.Weapon
//		                          ,100,20,3,0,0,0,false,WEAPONS.scaleBonus.Dex,false,20,2f,WEAPONS.weaponType.Pierce
//		                          ,1,5,0,'B',WEAPONS.weaponClass.Rapier,true,0);
        WEAPONS poke = new WEAPONS(true, true, "Rapier", "Worn down rapier", ITEMS.Type.Weapon
                                   , 100, 50, 5, 0, 0, 0, false, WEAPONS.scaleBonus.Dex, false, 3, 2f, WEAPONS.weaponType.Pierce
                                   , 1, 5, 0, 0, 'B', WEAPONS.weaponClass.Rapier, true, 0, 0.60f, 0f);
        ITEMS relic = new ITEMS(false, true, true, "Old Relic", "Ancient relic used in rituals. Regains small Hp.", true,
                                ITEMS.Type.Item, 50, 0, true, 10, 10, ITEMS.StatBoost.CurHp, 50, 0f, ITEMS.typeOfItem.Consumable);
        ITEMS paper = new ITEMS(false, true, true, "Fire Paper", "Ignite your main weapon in flames", true,
                                ITEMS.Type.Item, 100, 0, true, 20, 10, ITEMS.StatBoost.Fire, 10, 0f, ITEMS.typeOfItem.Buff);
        ITEMS magicPaper = new ITEMS(false, true, true, "Magic Paper", "Embuted your main weapon in magic", true,
                                     ITEMS.Type.Item, 100, 0, true, 20, 10, ITEMS.StatBoost.Magic, 10, 0f, ITEMS.typeOfItem.Buff);
        ITEMS ArtPaper = new ITEMS(false, true, true, "Mother Board", "Enhance your main weapon in artificial technology", true,
                                   ITEMS.Type.Item, 100, 0, true, 20, 10, ITEMS.StatBoost.Artificial, 10, 0f, ITEMS.typeOfItem.Buff);
        ITEMS grass = new ITEMS(false, true, true, "Grass", "Holy Grass", true,
                                ITEMS.Type.Item, 50, 0, true, 99, 99, ITEMS.StatBoost.CurStam, 0, 0f, ITEMS.typeOfItem.Consumable);
        ITEMS purus = new ITEMS(false, true, true, "Purus", "Regain mana.", true,
                                ITEMS.Type.Item, 50, 0, true, 99, 99, ITEMS.StatBoost.CurMana, 25, 0f, ITEMS.typeOfItem.Consumable);
        ITEMS knives = new ITEMS(false, true, true, "Throwing Knives", "Normal Knives", true,
                                 ITEMS.Type.Item, 150, 0, true, 99, 15, ITEMS.StatBoost.None, 10, 0f, ITEMS.typeOfItem.Throwable);
        ITEMS bullets = new ITEMS(false, true, true, "Bullets", "Used with a Pistol", false,
                                  ITEMS.Type.Item, 30, 0, true, 25, 25, ITEMS.StatBoost.None, 0, 0f, ITEMS.typeOfItem.Bullets);
        ITEMS fireBomb = new ITEMS(false, true, true, "Fire Bomb", "Explodes on contact", true,
                                   ITEMS.Type.Item, 150, 0, true, 10, 10, ITEMS.StatBoost.None, 0, 0f, ITEMS.typeOfItem.Throwable);
        ITEMS antidote = new ITEMS(false, true, true, "Antidote", "Used for curing poison.", true,
                                   ITEMS.Type.Item, 0, 0, true, 20, 10, ITEMS.StatBoost.Poison, 0, 0f, ITEMS.typeOfItem.Consumable);
        ITEMS shard = new ITEMS(false, true, true, "Tablet Shard", "Used for upgrading weapons.", false,
                                ITEMS.Type.Item, 0, 0, true, 99, 1, ITEMS.StatBoost.Shards, 0, 0f, ITEMS.typeOfItem.Consumable);
        SPELLS fireBall  = new SPELLS(false, false, "Fire Ball", "Cast a huge fire with this spell.", 0, 0, 10, SPELLS.SpellType.Fire, SPELLS.AtkType.Attack, 10, 0, 0);
        SPELLS magicMiss = new SPELLS(false, false, "Magic Missile", "Cast magic missile with this spell.", 0, 0, 10, SPELLS.SpellType.Magic, SPELLS.AtkType.Attack, 0, 10, 0);
//		ARMOR Ulta = new ARMOR(false,true,"Ultra Armor","Best in its class",ITEMS.EquipRegion.ChestSlot,
//		                               10000,1,50,50,50,50,124);
//		ARMOR KnightArmor = new ARMOR(false,true,"Knight Armor","2nd best in its class",ITEMS.EquipRegion.ChestSlot,
//		                       10000,1,25,25,25,25,70);
//		//Fire Grimoire



//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(fallenMask);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().EquipArmor(0,0);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(PerfectMask);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(LeatherShirt);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().EquipArmor(0,1);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(Ulta);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(KnightArmor);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(LeatherPants);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().EquipArmor(0,2);
////		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().EquipMainHand(0);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(Gun);
////		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().EquipOffHand(0);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(sheild);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(FireGem);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(MagicGem);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(ArtGem);
////		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(Hammer);
////		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(Gun);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(fallenSword);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(relic);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().EquipItem(0,0);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(paper);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(magicPaper);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(ArtPaper);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(grass);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(poke);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(GreatSword);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(staff);
//	//	GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().EquipMainHand(0);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(bullets);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(knives);
//	//	GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(book);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(fireBomb);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(antidote);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(shard);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(purus);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(Axe);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(fireBall);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty2(magicMiss);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().ChangeClass("Novice");
//		if(this.GetComponent<PlayerSave>().enabled == true)
//			this.GetComponent<PlayerSave>().SaveObject();
        //GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().EquipOffHand(0);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty(Body,false);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty(Leg,false);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty(item,false);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty(perm1,false);
//		GameObject.FindGameObjectWithTag("Player").GetComponent<Equipment>().FindEmpty(perm2,false);
    }
Пример #17
0
        private void GenerateSpellDescription(SPELLS selectedSpell)
        {
            if (selectedSpell != null)
            {
                if (!selectedSpell.s_name.Equals(""))
                {
                    _view.SpellDescription += selectedSpell.s_name + "\r\n";
                }

                if (!selectedSpell.s_school.Equals(""))
                {
                    _view.SpellDescription += selectedSpell.s_school + " ";
                }

                if (selectedSpell.s_level != null)
                {
                    _view.SpellDescription += "lvl " + selectedSpell.s_level.ToString() + "\r\n";
                }
                else if (!selectedSpell.s_school.Equals(""))
                {
                    _view.SpellDescription += "\r\n";
                }

                if (!selectedSpell.s_range.Equals(""))
                {
                    _view.SpellDescription += "Range: " + selectedSpell.s_range + "\r\n";
                }

                if (!selectedSpell.s_target.Equals(""))
                {
                    _view.SpellDescription += "Target: " + selectedSpell.s_target + "\r\n";
                }

                if (selectedSpell.s_castingtime != null)
                {
                    _view.SpellDescription += "Casting Time: " + selectedSpell.s_castingtime.ToString() + "\r\n";
                }

                if (selectedSpell.s_durationminutes != null)
                {
                    _view.SpellDescription += "Duration: " + selectedSpell.s_durationminutes.ToString() + "\r\n";
                }

                if (selectedSpell.s_isconcentration != null)
                {
                    _view.SpellDescription += "Concentration: " + (selectedSpell.s_isconcentration.GetValueOrDefault(false) ? "Y" : "N") + "\r\n";
                }

                if ((selectedSpell.s_component_m != null) || (selectedSpell.s_component_s != null) || (selectedSpell.s_component_v != null))
                {
                    _view.SpellDescription += "Components: ";

                    if (selectedSpell.s_component_m != null && !selectedSpell.s_component_m.Equals(""))
                    {
                        _view.SpellDescription += "M (" + selectedSpell.s_component_m + ") ";
                    }

                    if (selectedSpell.s_component_s != null && selectedSpell.s_component_s == true)
                    {
                        _view.SpellDescription += "S ";
                    }

                    if (selectedSpell.s_component_v != null && selectedSpell.s_component_v == true)
                    {
                        _view.SpellDescription += "V ";
                    }

                    _view.SpellDescription += "\r\n";
                }

                if (selectedSpell.s_description != null && !selectedSpell.s_description.Equals(""))
                {
                    _view.SpellDescription += "\r\n" + selectedSpell.s_description;
                }
            }
        }