generate the perfect python script to parse this string to extract attack details:…
- User
generate the perfect python script to parse this string to extract attack details: ghoul_data = "Ghoul: CR 1; Medium undead; HD 2d12; hp 13; Init +2; Spd 30 ft. (6 squares); AC 14 (+2 dex, +2 natural), touch 12, flat-footed 12; Base Atk +1; Grp +2; Atk +2 melee (1d6+1 plus paralysis, bite); Full Atk +2 melee (1d6+1 plus paralysis, bite) and +0 melee (1d3 plus paralysis, 2 claws); Space/Reach 5 ft./5 ft.; SA Ghoul fever, paralysis; SQ Darkvision 60 ft., undead traits, +2 turn resistance; AL CE; SV Fort +0, Ref +2, Will +5; Str 13, Dex 15, Con -, Int 13, Wis 14, Cha 12"
it should return: [{ "type": "bite", "attack bonus":2, "range": 5, "damage": "1d6+1", "effects": ["paralysis,"] }, { "type": "claws", "attack bonus":0, "range": "5", "damage": "(1d3", "effects": ["paralysis"]}]
also should work with different strings, such as this one: "Darkmantle: CR 1; Small magical beast; HD 1d10+1; hp 6; Init +4; Spd 20 ft. (4 squares), fly 30 ft. (poor); AC 17 (+1 size, +6 natural), touch 11, flat-footed 17; Base Atk +1; Grp +0; Atk +5 melee (1d4+4, slam); Full Atk +5 melee (1d4+4, slam); Space/Reach 5 ft./5 ft.; SA Darkness, improved grab, constrict 1d4+4; SQ Blindsight 90 ft.; AL N; SV Fort +3, Ref +2, Will +0; Str 16, Dex 10, Con 13, Int 2, Wis 10, Cha 10"
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.