readercolin
King
- Joined
- May 7, 2009
- Messages
- 604
Ok, I am now finally sitting down to play with this. But before I go and ruin my installation, (yes, I made a copy of FF BEFORE I started to mess with this), I would like to run my ideas past you.
What I am planning on doing is basically copying the worker function. The current worker function is like this
What I think this means is getBuildType() determines what is being built. This would be modified to become getSpellCast(). This would then get what spell is being cast, and how much mana is required to cast it. workRate(bMax, (BuildTypes)eBuild, (FeatureTypes)eFeature) I don't know what this does however. I think it places the workers work rate into the feature, adding that to the construction of what is being built. Then from appearances, the feature itself is what stores how much work has been done on it to get a particular construction completed on it.
So to convert this to spellcasting, I would need to create a "spell" unit (or promotion, or something) that then gets the units "mana" added to it, and once complete, turns into the spell. That at least is what I think would end up needing to be done to make it work. Please correct me if I am wrong.
-Colin
What I am planning on doing is basically copying the worker function. The current worker function is like this
PHP:
int /*BuildTypes*/ CyUnit::getBuildType()
{
return (int) m_pUnit ? m_pUnit->getBuildType() : (int) NO_BUILD;
}
int CyUnit::workRate(bool bMax, int eBuild, int eFeature)
{
return m_pUnit ? m_pUnit->workRate(bMax, (BuildTypes)eBuild, (FeatureTypes)eFeature) : -1;
}
What I think this means is getBuildType() determines what is being built. This would be modified to become getSpellCast(). This would then get what spell is being cast, and how much mana is required to cast it. workRate(bMax, (BuildTypes)eBuild, (FeatureTypes)eFeature) I don't know what this does however. I think it places the workers work rate into the feature, adding that to the construction of what is being built. Then from appearances, the feature itself is what stores how much work has been done on it to get a particular construction completed on it.
So to convert this to spellcasting, I would need to create a "spell" unit (or promotion, or something) that then gets the units "mana" added to it, and once complete, turns into the spell. That at least is what I think would end up needing to be done to make it work. Please correct me if I am wrong.
-Colin