diff options
| author | Mittendrein Markus <maxmitti@gmx.net> | 2016-02-14 18:10:24 +0100 |
|---|---|---|
| committer | Mittendrein Markus <maxmitti@gmx.net> | 2016-02-14 18:10:24 +0100 |
| commit | 50ffbf0f455f1ff34e98f0bdac3b7a9bf09d9192 (patch) | |
| tree | aab7cd9fbab7f0144676c639defdf95d47b43cb7 /TemplePushing.c4s | |
| parent | 33fc980e1ef5b82787f9687abe77d44f75d5a343 (diff) | |
| download | tempelschubsen-50ffbf0f455f1ff34e98f0bdac3b7a9bf09d9192.tar.gz tempelschubsen-50ffbf0f455f1ff34e98f0bdac3b7a9bf09d9192.zip | |
Colorize Scrolls with a color specific to their "magic element"
Diffstat (limited to 'TemplePushing.c4s')
| -rw-r--r-- | TemplePushing.c4s/Misc.c4d/AdditionalSpells.c4d/CrystalSpikes.c4d/Script.c | 2 | ||||
| -rw-r--r-- | TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/Script.c | 5 | ||||
| -rw-r--r-- | TemplePushing.c4s/Rules.c4d/OutFader.c4d/Script.c | 4 | ||||
| -rw-r--r-- | TemplePushing.c4s/System.c4g/MagicAir.c | 17 | ||||
| -rw-r--r-- | TemplePushing.c4s/System.c4g/MagicEarth.c | 11 | ||||
| -rw-r--r-- | TemplePushing.c4s/System.c4g/MagicFire.c | 11 | ||||
| -rw-r--r-- | TemplePushing.c4s/System.c4g/MagicWater.c | 10 | ||||
| -rw-r--r-- | TemplePushing.c4s/System.c4g/Scroll.c | 6 |
8 files changed, 61 insertions, 5 deletions
diff --git a/TemplePushing.c4s/Misc.c4d/AdditionalSpells.c4d/CrystalSpikes.c4d/Script.c b/TemplePushing.c4s/Misc.c4d/AdditionalSpells.c4d/CrystalSpikes.c4d/Script.c index 1da9bb2..40c910d 100644 --- a/TemplePushing.c4s/Misc.c4d/AdditionalSpells.c4d/CrystalSpikes.c4d/Script.c +++ b/TemplePushing.c4s/Misc.c4d/AdditionalSpells.c4d/CrystalSpikes.c4d/Script.c @@ -101,5 +101,5 @@ protected func PlaceCrystal(int startx, int starty, object pCaster) } public func GetSpellClass(object pMage) { return(EART); } -public func GetSpellCombo(pMage) { return ("444"); } // (1: Backward; 2: Down; 3: Forward; 4: Throw; 5: Jump; 6: Dig) +public func GetSpellCombo(pMage) { return ("244"); } // (1: Backward; 2: Down; 3: Forward; 4: Throw; 5: Jump; 6: Dig) diff --git a/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/Script.c b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/Script.c index def8ef0..dc358a5 100644 --- a/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/Script.c +++ b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/Script.c @@ -13,8 +13,9 @@ public func Enable(object spawner) private func SpawnObject() { - CreateContents(spawner->GetRandomDefinition()); + var obj = CreateContents(spawner->GetRandomDefinition()); SetGraphics(0, 0, Contents()->GetID(), GFX_Overlay, GFXOV_MODE_Base); + SetClrModulation(obj->GetClrModulation() || RGB(255, 255, 255), this, GFX_Overlay); SetObjDrawTransform(1000, 0, 0, 0, 1000, -5000, 0, 1); } @@ -49,7 +50,7 @@ protected func RejectEntrance(object container) if (Contents()) return true; container->Sound("Grab", false, 0, 0, GetOwner(container) + 1); - + SetGraphics(0, 0, 0, GFX_Overlay, GFXOV_MODE_Base); framesUntilRespawn = spawner->GetSpawnInterval(); diff --git a/TemplePushing.c4s/Rules.c4d/OutFader.c4d/Script.c b/TemplePushing.c4s/Rules.c4d/OutFader.c4d/Script.c index ccd9e08..de61ef5 100644 --- a/TemplePushing.c4s/Rules.c4d/OutFader.c4d/Script.c +++ b/TemplePushing.c4s/Rules.c4d/OutFader.c4d/Script.c @@ -61,7 +61,7 @@ func FxFadeOutStart(pTarget,iEffectNumber) func FxFadeOutStop(pTarget,iEffectNumber) { - SetClrModulation(RGBa(255,255,255),pTarget); + SetClrModulation(RGBpA(GetClrModulation(pTarget) || RGB(255, 255, 255)),pTarget); return(1); } @@ -71,7 +71,7 @@ func FxFadeOutTimer(pTarget,iEffectNumber) if (Contained(pTarget) || pTarget->~AvoidFadeOut()) return(-1); EffectVar(0,pTarget,iEffectNumber)--; if (!EffectVar(0,pTarget,iEffectNumber)) RemoveObject(pTarget); - SetClrModulation(RGBa(255,255,255,255-EffectVar(0,pTarget,iEffectNumber)),pTarget); + SetClrModulation(RGBpA(GetClrModulation(pTarget) || RGB(255, 255, 255), 255-EffectVar(0,pTarget,iEffectNumber)),pTarget); return(1); } diff --git a/TemplePushing.c4s/System.c4g/MagicAir.c b/TemplePushing.c4s/System.c4g/MagicAir.c new file mode 100644 index 0000000..2c4a60d --- /dev/null +++ b/TemplePushing.c4s/System.c4g/MagicAir.c @@ -0,0 +1,17 @@ +/*-- No color-modulation for scrolls --*/
+#strict 2
+#appendto ABLA
+#appendto MBOT
+#appendto GVTY
+#appendto MLGT
+#appendto CFAL
+#appendto MINV
+#appendto MDFL
+#appendto AFST
+#appendto MATT
+#appendto TSHL
+
+func ScrollColor()
+{
+ return RGB(255, 255, 255);
+}
diff --git a/TemplePushing.c4s/System.c4g/MagicEarth.c b/TemplePushing.c4s/System.c4g/MagicEarth.c new file mode 100644 index 0000000..ab71cfd --- /dev/null +++ b/TemplePushing.c4s/System.c4g/MagicEarth.c @@ -0,0 +1,11 @@ +/*-- Green color for scrolls --*/
+#strict 2
+#appendto MSSH
+#appendto MARK
+#appendto MGPL
+#appendto MGCY
+
+func ScrollColor()
+{
+ return RGB(0, 192, 0);
+}
diff --git a/TemplePushing.c4s/System.c4g/MagicFire.c b/TemplePushing.c4s/System.c4g/MagicFire.c new file mode 100644 index 0000000..5a09c55 --- /dev/null +++ b/TemplePushing.c4s/System.c4g/MagicFire.c @@ -0,0 +1,11 @@ +/*-- Red color for scrolls --*/
+#strict 2
+#appendto MDBT
+#appendto MFRB
+#appendto LAVS
+#appendto MGFL
+
+func ScrollColor()
+{
+ return RGB(255, 0, 0);
+}
diff --git a/TemplePushing.c4s/System.c4g/MagicWater.c b/TemplePushing.c4s/System.c4g/MagicWater.c new file mode 100644 index 0000000..39abd7a --- /dev/null +++ b/TemplePushing.c4s/System.c4g/MagicWater.c @@ -0,0 +1,10 @@ +/*-- Blue color for scrolls --*/
+#strict 2
+#appendto MFWV
+#appendto ICNL
+#appendto MICS
+
+func ScrollColor()
+{
+ return RGB(0, 0, 255);
+}
diff --git a/TemplePushing.c4s/System.c4g/Scroll.c b/TemplePushing.c4s/System.c4g/Scroll.c index 7cf2ee1..15ae5e0 100644 --- a/TemplePushing.c4s/System.c4g/Scroll.c +++ b/TemplePushing.c4s/System.c4g/Scroll.c @@ -45,3 +45,9 @@ private func DoMagic(object pByClonk) SetVisibility(VIS_Owner | VIS_Allies, this); return _inherited(pByClonk); } + +func SetSpell(id spell) +{ + SetClrModulation(spell->~ScrollColor()); + return _inherited(spell, ...); +} |
