Summon Creature
Posted: Fri Aug 30, 2019 1:03 pm
Kind time of the day, tell me you need to ensure that the spell does not automatically select the beast, but issues a sign to select the listed animals
use util;
include "summon";
include "include/attributes";
include "include/spellRestrictions";
program cast_summon( parms )
var circle := 5;
var delivery := "indirect";
var noto := "neutral";
var result := maincast(parms, delivery, circle, noto, 40);
if(result == 0)
return;
endif
var caster := result[1];
var cast_on := result[2];
var thecreature;
var thecritter;
var critgroup;
var basemagery := CInt(GetEffectiveSkill(caster, SKILLID_MAGERY));
if (basemagery < 70)
critgroup := RandomInt(1);
elseif (basemagery < 80)
critgroup := RandomInt(1)+1;
elseif (basemagery < 90)
critgroup := RandomInt(1)+2;
else
critgroup := 3;
endif
var critter := RandomInt(19);
case (critter)
0: thecreature := "chicken";
1: thecreature := "cat";
2: thecreature := "slime";
3: thecreature := "sheep";
4: thecreature := "pig";
5: thecreature := "dog";
6: thecreature := "grat";
7: thecreature := "eagle";
8: case(RandomInt(4))
0: thecreature := "horse";
1: thecreature := "horse2";
2: thecreature := "horse3";
3: thecreature := "horse4";
endcase
9: thecreature := "gorilla";
10: thecreature := "panther";
11: thecreature := "deer";
12: thecreature := "bear";
13: thecreature := "ghart";
14: thecreature := "blackbear";
15: thecreature := "alligator";
16: thecreature := "giantspider";
17: thecreature := "giant_serpent";
18: thecreature := "polar";
endcase
summon_creature( caster, circle, thecreature, cast_on );
endprogram
use util;
include "summon";
include "include/attributes";
include "include/spellRestrictions";
program cast_summon( parms )
var circle := 5;
var delivery := "indirect";
var noto := "neutral";
var result := maincast(parms, delivery, circle, noto, 40);
if(result == 0)
return;
endif
var caster := result[1];
var cast_on := result[2];
var thecreature;
var thecritter;
var critgroup;
var basemagery := CInt(GetEffectiveSkill(caster, SKILLID_MAGERY));
if (basemagery < 70)
critgroup := RandomInt(1);
elseif (basemagery < 80)
critgroup := RandomInt(1)+1;
elseif (basemagery < 90)
critgroup := RandomInt(1)+2;
else
critgroup := 3;
endif
var critter := RandomInt(19);
case (critter)
0: thecreature := "chicken";
1: thecreature := "cat";
2: thecreature := "slime";
3: thecreature := "sheep";
4: thecreature := "pig";
5: thecreature := "dog";
6: thecreature := "grat";
7: thecreature := "eagle";
8: case(RandomInt(4))
0: thecreature := "horse";
1: thecreature := "horse2";
2: thecreature := "horse3";
3: thecreature := "horse4";
endcase
9: thecreature := "gorilla";
10: thecreature := "panther";
11: thecreature := "deer";
12: thecreature := "bear";
13: thecreature := "ghart";
14: thecreature := "blackbear";
15: thecreature := "alligator";
16: thecreature := "giantspider";
17: thecreature := "giant_serpent";
18: thecreature := "polar";
endcase
summon_creature( caster, circle, thecreature, cast_on );
endprogram