diff options
| author | Mittendrein Markus <maxmitti@gmx.net> | 2016-03-08 21:08:34 +0100 |
|---|---|---|
| committer | Mittendrein Markus <maxmitti@gmx.net> | 2016-03-08 21:08:34 +0100 |
| commit | c7374e557db7220b63fbcba359d929ad579f478d (patch) | |
| tree | e86c89f8698a204d9605af95840e90b4336a2aa6 /TemplePushing.c4s/Misc.c4d | |
| parent | 3bdc6f62340029048a5100fb393b6837e5460e0d (diff) | |
| download | tempelschubsen-c7374e557db7220b63fbcba359d929ad579f478d.tar.gz tempelschubsen-c7374e557db7220b63fbcba359d929ad579f478d.zip | |
Reposition scroll vertices and increase friction
Diffstat (limited to 'TemplePushing.c4s/Misc.c4d')
| -rw-r--r-- | TemplePushing.c4s/Misc.c4d/Scroll.c4d/ActMap.txt | 16 | ||||
| -rw-r--r-- | TemplePushing.c4s/Misc.c4d/Scroll.c4d/DefCore.txt | 21 | ||||
| -rw-r--r-- | TemplePushing.c4s/Misc.c4d/Scroll.c4d/DescDE.txt | 1 | ||||
| -rw-r--r-- | TemplePushing.c4s/Misc.c4d/Scroll.c4d/DescUS.txt | 1 | ||||
| -rw-r--r-- | TemplePushing.c4s/Misc.c4d/Scroll.c4d/Graphics.png | bin | 0 -> 6636 bytes | |||
| -rw-r--r-- | TemplePushing.c4s/Misc.c4d/Scroll.c4d/GraphicsFull.png | bin | 0 -> 7241 bytes | |||
| -rw-r--r-- | TemplePushing.c4s/Misc.c4d/Scroll.c4d/Names.txt | 2 | ||||
| -rw-r--r-- | TemplePushing.c4s/Misc.c4d/Scroll.c4d/Script.c | 155 | ||||
| -rw-r--r-- | TemplePushing.c4s/Misc.c4d/Scroll.c4d/StringTblDE.txt | 6 | ||||
| -rw-r--r-- | TemplePushing.c4s/Misc.c4d/Scroll.c4d/StringTblUS.txt | 6 |
10 files changed, 208 insertions, 0 deletions
diff --git a/TemplePushing.c4s/Misc.c4d/Scroll.c4d/ActMap.txt b/TemplePushing.c4s/Misc.c4d/Scroll.c4d/ActMap.txt new file mode 100644 index 0000000..5992ca8 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Scroll.c4d/ActMap.txt @@ -0,0 +1,16 @@ +[Action]
+Name=Be
+Procedure=NONE
+Directions=2
+FacetBase=1
+NextAction=Hold
+
+[Action]
+Name=WannaRemove
+Procedure=ATTACH
+Directions=2
+FacetBase=0
+Delay=10
+Length=1
+EndCall=WannaRemove
+NextAction=WannaRemove
diff --git a/TemplePushing.c4s/Misc.c4d/Scroll.c4d/DefCore.txt b/TemplePushing.c4s/Misc.c4d/Scroll.c4d/DefCore.txt new file mode 100644 index 0000000..a81336a --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Scroll.c4d/DefCore.txt @@ -0,0 +1,21 @@ +[DefCore]
+id=SCRL
+Version=4,9,8
+Name=Scroll
+Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase
+MaxUserSelect=10
+Width=5
+Height=10
+Offset=-2,-5
+Vertices=2
+VertexX=1,0
+VertexY=-5,5
+VertexFriction=30,30
+Value=2
+Mass=5
+Components=WOOD=1
+Picture=5,0,64,64
+Rebuy=1
+Collectible=1
+Rotate=1
+Float=1
diff --git a/TemplePushing.c4s/Misc.c4d/Scroll.c4d/DescDE.txt b/TemplePushing.c4s/Misc.c4d/Scroll.c4d/DescDE.txt new file mode 100644 index 0000000..9ae9106 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Scroll.c4d/DescDE.txt @@ -0,0 +1 @@ +Magisch bewanderte Clonks können per Doppelgraben einen Zauberspruch darauf ablegen.
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/Scroll.c4d/DescUS.txt b/TemplePushing.c4s/Misc.c4d/Scroll.c4d/DescUS.txt new file mode 100644 index 0000000..c32345c --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Scroll.c4d/DescUS.txt @@ -0,0 +1 @@ +Clonks who are adept with magic can store a spell on it (double dig).
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/Scroll.c4d/Graphics.png b/TemplePushing.c4s/Misc.c4d/Scroll.c4d/Graphics.png Binary files differnew file mode 100644 index 0000000..c3d0597 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Scroll.c4d/Graphics.png diff --git a/TemplePushing.c4s/Misc.c4d/Scroll.c4d/GraphicsFull.png b/TemplePushing.c4s/Misc.c4d/Scroll.c4d/GraphicsFull.png Binary files differnew file mode 100644 index 0000000..cb1e692 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Scroll.c4d/GraphicsFull.png diff --git a/TemplePushing.c4s/Misc.c4d/Scroll.c4d/Names.txt b/TemplePushing.c4s/Misc.c4d/Scroll.c4d/Names.txt new file mode 100644 index 0000000..7134cfb --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Scroll.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schriftrolle
+US:Scroll
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/Scroll.c4d/Script.c b/TemplePushing.c4s/Misc.c4d/Scroll.c4d/Script.c new file mode 100644 index 0000000..cf3619f --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Scroll.c4d/Script.c @@ -0,0 +1,155 @@ +#strict
+
+local idSpell, pAimingClonk;
+
+protected func CalcValue()
+{
+ var iSpell;
+ if(idSpell) iSpell=GetValue(0,idSpell);
+ return(GetValue(0,GetID())+iSpell*2/3); // *1/2 wäre 1:1 für preis
+}
+
+protected func RejectEntrance()
+{
+ if(GetAction() eq "WannaRemove") return(1);
+}
+
+public func Selection()
+{
+ // wer bin ich? der da!
+ if(idSpell) PlayerMessage(GetOwner(Contained()),"{{%i}} %s",Contained(),idSpell,GetName(0,idSpell));
+}
+
+protected func Entrance(object pContainer) { if(GetOCF(pContainer) & OCF_CrewMember()) Selection(); }
+
+protected func Activate(object pByClonk)
+{
+ if(!idSpell) MagicMenu(pByClonk);
+ else DoMagic(pByClonk);
+ return(1);
+}
+
+private func MagicMenu(object pByClonk) {
+ // Nicht bereit
+ if(!(pByClonk->~ReadyToMagic())) return(0);
+ if(GetAction(pByClonk) ne "Walk") return(0);
+ // Clonk soll anhalten
+ SetComDir(COMD_Stop(), pByClonk);
+ // Menü öffnen
+ OpenSpellMenu(pByClonk, this, "$MnuEnchant$: %s", "SetMagic", GetOwner(pByClonk), pByClonk, "$MnuNoSpells$");
+}
+
+private func SetMagic(id idMagic, object pByClonk) {
+ // Nicht genug Zauberenergie
+ if(!CheckMana(idMagic,pByClonk))
+ {
+ Sound("Error");
+ Message("$TxtNotEnoughEnergy$",this());
+ return();
+ }
+
+ // Nicht genug alchemische Komponenten
+ if(ObjectCount(ALCO)) if(!CheckAlchem(idMagic,pByClonk))
+ {
+ Sound("Error");
+ Message("$TxtNotEnoughIngredients$",this(),GetNeededAlcStr(idMagic,pByClonk));
+ return();
+ }
+
+ // Energie abziehen
+ DoMagicEnergy(-Value(idMagic),pByClonk);
+
+ // alchemische Zutaten abziehen
+ if(ObjectCount(ALCO)) ReduceAlchem(idMagic,pByClonk);
+
+ // Aktuelle Zauberkraft des zaubernden Clonks trainieren, sowie sonstige, szenarienspezifische Aufrufe
+ OnClonkSucceededSpell(idMagic, pByClonk);
+
+ SetSpell(idMagic);
+
+ // Effekte!
+ CastParticles("MSpark", 20, 40, 0,0, 30, 45, GetPlrColorDw(GetOwner(pByClonk)));
+
+ // Nachricht!
+ PlayerMessage(GetOwner(pByClonk),"$MsgSpellSet$", pByClonk, GetName(0,idMagic));
+
+ // Aktion für den Clonk setzen
+ pByClonk->SetAction("Magic");
+
+ Sound("Magic*");
+}
+
+public func SetSpell(id idMagic) {
+ // Rolle ist nun beschrieben
+ SetGraphics("Full");
+
+ // Grafik setzen
+ SetGraphics(0,0,idMagic,1,GFXOV_MODE_Picture);
+ SetObjDrawTransform(350,-300,3000,150,500,-2000, this(), 1);
+
+ // Aktion für die Schriftrolle setzen
+ SetAction("Be");
+
+ idSpell = idMagic;
+
+ // Name setzen
+ UpdateName();
+}
+
+private func DoMagic(object pByClonk) {
+ // Richtung
+ SetDir(GetDir(pByClonk));
+ // In den Besitz des Clonk-Controllers, damit der Verfeindungscheck diverser Zauber funktioniert
+ SetOwner(GetController(pByClonk));
+ SetController(GetOwner());
+ // Zauber
+ if(CreateObject(idSpell,0,0,GetController(pByClonk))->~Activate(this(),pByClonk))
+ { Exit(); SetAction("WannaRemove",pByClonk); }
+ else PlayerMessage(GetOwner(Contained()),"$MsgNothingHappened$",Contained());
+}
+
+protected func WannaRemove() {
+ // manche Zauber hängen gerne Effekte an den Caster
+ if(!GetEffectCount(0,this()) && !pAimingClonk) RemoveObject();
+}
+
+protected func AttachTargetLost() {
+ RemoveObject();
+}
+
+public func SpellAiming(object pSpell, object pAimingClnk)
+ {
+ // Clonk zielt: Schriftrolle vorerst nicht entfernen
+ pAimingClonk = pAimingClnk;
+ }
+
+public func SpellSucceeded(id idSpell, object pAimingClnk)
+ {
+ // Clonk hat fertig gezielt: Schriftrolle kann weg
+ pAimingClonk = 0;
+ }
+
+public func SpellFailed(id idSpell, object pAimingClnk)
+ {
+ // Zauber beim Zielen abgebrochen: Schriftrolle restaurieren
+ pAimingClonk = 0;
+ return(SetSpell(idSpell));
+ }
+
+public func IsMagicProduct() { return(true); }
+
+protected func UpdateTransferZone()
+ {
+ // Für Objects.txt-Schriftrollen
+ UpdateName();
+ }
+
+protected func UpdateName()
+ {
+ // Namen nach Zauber setzen
+ if (idSpell)
+ SetName(Format("%s: %s", GetName(0, GetID()), GetName(0,idSpell)));
+ else
+ SetName();
+ }
+
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/Scroll.c4d/StringTblDE.txt b/TemplePushing.c4s/Misc.c4d/Scroll.c4d/StringTblDE.txt new file mode 100644 index 0000000..2713461 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Scroll.c4d/StringTblDE.txt @@ -0,0 +1,6 @@ +MnuNoSpells=Keine Zaubersprüche verfügbar
+MnuEnchant=Zauber wählen
+TxtNotEnoughIngredients=Nicht genug|alchemische Zutaten!|Es fehlen|%s.
+TxtNotEnoughEnergy=Nicht genug Zauberenergie!
+MsgNothingHappened=Nichts passiert!
+MsgSpellSet=Schriftrolle mit|<i>%s</i> belegt!
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/Scroll.c4d/StringTblUS.txt b/TemplePushing.c4s/Misc.c4d/Scroll.c4d/StringTblUS.txt new file mode 100644 index 0000000..26458ef --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Scroll.c4d/StringTblUS.txt @@ -0,0 +1,6 @@ +MnuNoSpells=No spells known
+MnuEnchant=Choose spell
+TxtNotEnoughIngredients=Not enough|alchemistic ingredients!|%s|are missing.
+TxtNotEnoughEnergy=Not enough|magical energy!
+MsgNothingHappened=Nothing happened!
+MsgSpellSet=Scroll allocated|with <i>%s</i>!
\ No newline at end of file |
