Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualToriath

Posted 21 May 2013 - 10:37 AM

In terms of Creating Weapons, I would have a base "WeaponBase" class which knows what "Component" object(s) it needs to make the Weapon and use inhertiance so: class UberLongSword extends WeaponBase.

 

So a Iron Sword knows it needs 4x Iron Ingots and 1xWooden stick to make.

 

Hmm, this looks okay, but what if an Iron Sword could be crafted with lets say 5 different kinds of handles and 7 different kinds of blades? (f.E. sharp blade, rusty blade, long blade...)
I'll  just go and tell the Sword to use 1 blade and 1 handle and make each "kind of handle", a subclass of handle?

 

Hmm your Shuriken object doesnt need to hold 'n' Spike objects, Thats a waste of space.

 

Personally I'd just have a a yield function in the Shuriken object (or Deconstruct) which returns 'n' number of NEW Spike objects and a core.

 

So for instance:

 

Stage 1: Player inventory

 

4 x Spikes
1 x Core

 

Stage 2: Player visits a workbench turns the 4 spikes and 1 core into 1 Shuriken Object.

 

Stage 3: Player receives 1 Shuriken, their inventory is now

 

1 x Shuriken

 

The Shuriken object holds the number of spikes used to create it, (as an INTEGER) and then when the player deconstructs the object

 

 

object[] Deconstruct()
{ return 1x core and 'n' Spikes. }

Well, that would work, but what if the shuriken is build out of different spikes? Maybe one grants firedamage and another armor penetration? Would theses Objects still be waste of space?

Maybe I didn't pointed it out before, but there wont be predefined weapons. So a Sword is not only handle + Blade

What I want is "Sword = Handle + Blade + Optional Items (Power stones f.E.). The Swords Name, attributes etc. shall be generatet out of its materials stats.
If i got a big handle(2 att per sec) + long, sharp ironblade(90 damage, Armorpenetration, durability) its going to be a "Sharp Twohanded Ironblade of fast devastation"

Thanks for your answer by the way smile.png

Toriath


#1Toriath

Posted 21 May 2013 - 10:35 AM

In terms of Creating Weapons, I would have a base "WeaponBase" class which knows what "Component" object(s) it needs to make the Weapon and use inhertiance so: class UberLongSword extends WeaponBase.

 

So a Iron Sword knows it needs 4x Iron Ingots and 1xWooden stick to make.

 

Hmm, this looks okay, but what if an Iron Sword could be crafted with lets say 5 different kinds of handles and 7 different kinds of blades? (f.E. sharp blade, rusty blade, long blade...)
I'll  just go and tell the Sword to use 1 blade and 1 handle and each kind of handle a subclass of handle?

 

Hmm your Shuriken object doesnt need to hold 'n' Spike objects, Thats a waste of space.

 

Personally I'd just have a a yield function in the Shuriken object (or Deconstruct) which returns 'n' number of NEW Spike objects and a core.

 

So for instance:

 

Stage 1: Player inventory

 

4 x Spikes
1 x Core

 

Stage 2: Player visits a workbench turns the 4 spikes and 1 core into 1 Shuriken Object.

 

Stage 3: Player receives 1 Shuriken, their inventory is now

 

1 x Shuriken

 

The Shuriken object holds the number of spikes used to create it, (as an INTEGER) and then when the player deconstructs the object

 

 

object[] Deconstruct()
{ return 1x core and 'n' Spikes. }

Well, that would work, but what if the shuriken is build out of different spikes? Maybe one grants firedamage and another armor penetration? Would theses Objects still be waste of space?

Maybe I didn't pointed it out before, but there wont be predefined weapons. So a Sword is not only handle + Blade

What I want is "Sword = Handle + Blade + Optional Items (Power stones f.E.). The Swords Name, attributes etc. shall be generatet out of its materials stats.
If i got a big handle(2 att per sec) + long, sharp ironblade(90 damage, Armorpenetration, durability) its going to be a "Sharp Twohanded Ironblade of fast devastation"

Thanks for your answer by the way :)

Toriath


PARTNERS