View Single Post
 
Reply
Posted 2005-04-12, 05:03 PM in reply to Medieval Bob's post starting "Well, how about a weapon having a..."
Fire 1/2/3, Water 1/2/3, Bolt 1/2/3, Earth 1/2/3, Meteo, Flare, Ultima (15 stones, plus the blank for 16 types). Not too bad, but remember that it's a 16x multiplier to however many "base" weapons you have in the game. Assuming 25 weapons, that's 400 with that system. Of course, it depends ENTIRELY on whether or not you want to put that kind of effort into it.


Also, I'm wondering what the difference between the Fire and Fire3 swords would be? Just attack power? Because they'd both simply have the Fire element on it.

"Breaking" the weapon would require some major forethought, however - Unless you like having code like this:

Code:
Bad Code

if you picked to upgrade Dude 1's weapon: 
{
if Dude 1's equipped sword = fire1 sword
   {
      unequip Dude 1's sword
      delete fire1 sword
      add sword
      add fire1 stone
   }
   
   if Dude 1's equipped sword = fire2 sword
   {
      unequip Dude 1's sword
      delete fire2 sword
      add sword
      add 3 fire1 stones
   }
   
   if Dude 1's equipped sword = fire3 sword
   {
      unequip Dude 1's sword
      delete fire3 sword
      add sword
      add 9 fire1 stones
   }
}

if you picked to upgrade dude 2's weapon:
{
   if Dude 2's equipped sword = fire1 sword
   {
      unequip Dude 2's sword
      delete fire1 sword
      add sword
      add fire1 stone
   }
   
   if Dude 2's equipped sword = fire2 sword
   {
      unequip Dude 2's sword
      delete fire2 sword
      add sword
      add 3 fire1 stones
   }
   
   if Dude 2's equipped sword = fire3 sword
   {
      unequip Dude 2's sword
      delete fire3 sword
      add sword
      add 9 fire1 stones
   }
}
Not very neat, nearly impossible to change who owns what weapon, and shared weapons would get confusing as heck.

At a glance, it would be better to do something like below. However, you'd have to plan the items in advance, so that the numbers are done correctly. The Weak Sword (and variants) might be number 21-40, the Medium Sword might be 41-60, etc.

Code:
Assumes weapon is EQUIPPED

[xxxx:WeaponEquipped] = Weapon# of member whose weapon you selected

<> Unequip Weapon from selected character


   if WeaponEquipped > 40
      {
         if WeaponEquipped = 41  // Medium Fire1 Sword
         {
              Add 1 Fire1 crystal to inventory 
         }
         if WeaponEquipped = 42  // Medium Fire2 Sword
         {
              Add 3 Fire1 crystals to inventory 
         }
         if WeaponEquipped = 43  // Medium Fire3 Sword
         {
              Add 9 Fire1 crystals to inventory 
         }
         // Since we're in the Medium Sword Area, we know what to get back 
         // (and WeaponNumber tells us which weapon to remove)

         Remove 1 item (WeaponNumber)
         Add 1 Medium Sword
         Goto Label 1 (which would be at the end, obviously)
   }


   if WeaponEquipped > 20
      {
         if WeaponEquipped = 21  // Weak Fire1 Sword
         {
              Add 1 Fire1 crystal to inventory 
         }
         if WeaponEquipped = 22  // Weak Fire2 Sword
         {
              Add 3 Fire1 crystals to inventory 
         }
         if WeaponEquipped = 23  // Weak Fire3 Sword
         {
              Add 9 Fire1 crystals to inventory 
         }
         // Since we're in the Weak Sword Area, we know what to get back 
         // (and WeaponNumber tells us which weapon to remove)

         Remove 1 item (WeaponNumber)
         Add 1 Weak Sword
         Goto Label 1 (which would be at the end, obviously)
   }

}
Interestingly, weapon upgrades would be best done in the following manner - get the current weapon number, and see what you have. If you have a "base" number ( (WeaponUpgrade - 1) % 10 = 0 ), which simply means that it "ends in 0", it's a base weapon - no need to see if it's equal to 20, equal to 40, equal to 60, equal to 80, etc. Then, you would see what "kind" of upgrade you'd want. If you want a Fire3 upgrade? Simply take the base number and add 3, and add that sword to the inventory (taking away the Fire3 crystal in the process, of course). Not as much coding as 30 if statements... and if you want to change a weapon's owner? The routine DOESN'T CARE who owns what weapon - just see if Dude 1's weapon is a base weapon, add 3, and you're done.

Bah, I have a bad habit of coding something in my head whenever I see a suggestion, but you're used to it by now anyway...
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube